Python package for agilex robotics mobile base platform

Overview

This is Python API for Agilex Robotics Mobile base

This is a python API for Can communication with Agilex Robotics Mobile base and controlling it.

Support product list

Installation

Notes:
Make sure that python version >=3.6. if you have python3 and python2 ,please use python3

pip

pip3 install pyagxrobots
Notes:
Make sure that pip3 version >= 9.0.0.
pip3 -V     																				 #cheak the pip3 version
python3 -m pip install --upgrade pip                          #updata pip3

Setup CAN-To-USB adapter

  1. Enable gs_usb kernel module

    $ sudo modprobe gs_usb
  2. Bringup can device

    $ sudo ip link set can0 up type can bitrate 500000
  3. If no error occured during the previous steps, you should be able to see the can device now by using command

    $ ifconfig -a
  4. Install and use can-utils to test the hardware

    $ sudo apt install can-utils
  5. Testing command

    # receiving data from can0
    $ candump can0
    # send data to can0
    $ cansend can0 001#1122334455667788

You can run 1-5 for the first-time setup and run 2 to bring up the device each time you unplug and re-plug the adapter.

import to your project

#!/usr/bin/env python3
# coding=utf-8
from pyagxrobots import agxrobots
robots=agxrobots.UGV(bustype='socketcan', channel='can0', bitrate=500000) 

function list:

EnableCANCtrl()
SendVersionRequest()
SendErrorClearByte()
EnableLightCtrl()
DisableLightCtrl()
LightFrontMode()
SendLinerVelocity()
SendAngularVelocity()

GetLightMode()        
GetSysVersion()
GetLeftWheelOdem()
GetRightWheelOdem()
GetLinerVelocity()
GetAngularVelocity()
GetErrorCode()

EnableCANCtrl

  • Prototype: EnableCANCtrl()
  • Description:Enable Controller Area Network control.

SendVersionRequest

  • Prototype: SendVersionRequest()
  • Description:Send Version Request to robots.

SendErrorClearByte

  • Prototype: SendErrorClearByte(id)
  • Description:Send Error Clear Byte to robots.
  • Parameters
    • id:(int) 0-4 0:all 14 :clear motro 14

EnableLightCtrl

  • Prototype: EnableLightCtrl()
  • Description:Enable Light control to robots.

DisableLightCtrl

  • Prototype: DisableLightCtrl()
  • Description:Enable Light control to robots.

LightFrontMode

  • Prototype: LightFrontMode(mode,bright)
  • Description:Send Error Clear Byte to robots.
  • Parameters
    • mode:(int)0~3 0:often shut 1:normally open 2:breathing lamp 3:custom
    • bright:(int) 0~100 Note: mode must be 3

SendLinerVelocity

  • Prototype: SendLinerVelocity(liner_velocity)
  • Description:Send liner_velocity to robots.
  • Parameters
    • liner_velocity:(float)-3.0~3.0 m/s

SendAngularVelocity

  • Prototype: SendAngularVelocity(angular_velocity)
  • Description:Send angular_velocity to robots.
  • Parameters
    • angular_velocity:(float)-2.523~2.523 rad/s

GetLightMode

  • Prototype: GetLightMode()
  • Description:get robots light mode .
  • Return:light mode

GetSysVersion

  • Prototype: GetSysVersion()
  • Description:get robots system version .
  • Return:ControlHardwareVersion,ActuarorHardwareVersion,ControlSoftwareVersion,GetActuarorSoftwareVersion

GetLeftWheelOdem

  • Prototype: GetLeftWheelOdem()
  • Description:get robots LeftWheelOdem .
  • Return:LeftWheelOdem

GetRightWheelOdem

  • Prototype: GetRightWheelOdem()
  • Description:get robots RightWheelOdem .
  • Return:RightWheelOdem

GetLinerVelocity

  • Prototype: GetLinerVelocity()
  • Description:get robots liner_velocity .
  • Return:liner_velocity

GetAngularVelocity

  • Prototype: GetAngularVelocity()
  • Description:get robots angular_velocity .
  • Return:angular_velocity

GetErrorCode

  • Prototype: GetErrorCode()
  • Description:get robots error_code .
  • Return:error_code

Example

Note:

For safety, please ensure that the robot's wheels are off the ground

1.Open Front Light

#!/usr/bin/env python3
# coding=utf-8
from pyagxrobots import agxrobots
robots=agxrobots.UGV(bustype='socketcan', channel='can0', bitrate=500000) 
robots.EnableCANCtrl()
robots.EnableLightCtrl()
robots.LightFrontMode(1)

2.Move Robot

#!/usr/bin/env python3
# coding=utf-8
from pyagxrobots import agxrobots
robots=agxrobots.UGV(bustype='socketcan', channel='can0', bitrate=500000) 
robots.EnableCANCtrl()
robots.SendLinerVelocity(0.2)

3.get CAN message

#!/usr/bin/env python3
# coding=utf-8
from pyagxrobots import agxrobots
robots=agxrobots.UGV(bustype='socketcan', channel='can0', bitrate=500000) 
robots.EnableCANCtrl()
robots.GetAngularVelocity()
robots.GetLinerVelocity()
Owner
Agilex Robotics (Dongguan) CO,.ltd
SpaceManJax's open-source Discord Bot. Now on Github!

SpaceManBot This is SpaceManJax's open-source Discord.py Bot. Now on Github! This bot runs on Repl.it, which is a free online code editor. It can do a

Jack 1 Nov 16, 2021
A Simple Telegram Maths Calculator Bot

Calculator-Bot-v1 A Simple Telegram Maths Calculator Bot Demo BOT LINK: Variables Variables Required Variables API_HASH: Get

ᗪᗩᖇK ✞Oᖇᗪ 1 Dec 18, 2021
gnosis safe tx builder

Ape Safe: Gnosis Safe tx builder Ape Safe allows you to iteratively build complex multi-step Gnosis Safe transactions and safely preview their side ef

228 Dec 22, 2022
Neko: An Anime themed advance Telegram group management bot

𝑪𝒖𝒕𝒊𝒆𝒑𝒊𝒊 𝑹𝒐𝒃𝒐𝒕 A modular telegram Python bot running on python3 wit

「 Rajkumar™ 」 39 Jan 08, 2023
The Easy-to-use Dialogue Response Selection Toolkit for Researchers

Easy-to-use toolkit for retrieval-based Chatbot Our released data can be found at this link. Make sure the following steps are adopted to use our code

GMFTBY 32 Nov 13, 2022
Matrix trivia bot with python

Matrix-trivia-bot Getting started See SETUP.md for how to setup and run the template project. Project structure A reference of each file included in t

1 Nov 16, 2021
SaltConf21: Adding Workflow Approval to Salt

SaltConf21: Adding Workflow Approval to Salt Running To run the example, install Docker and docker-compose and run the following commands: docker-comp

SSYS Sistemas 4 Nov 24, 2021
Ethereum Gas Fee for the MacBook Pro touchbar (using BetterTouchTool)

Gasbar Ethereum Gas Fee for the MacBook Pro touchbar (using BetterTouchTool) Worried about Ethereum gas fees? Me too. I'd like to keep an eye on them

TSS 51 Nov 14, 2022
Automatically mass follows tons of NameMC profiles.

Automatically mass follows tons of NameMC profiles. (Creates REAL traffic to your profile)

Jam 3 Jun 29, 2022
Robot Swerve Test Public With Python

Robot-Swerve-Test-Public The codebase for our swerve drivetrain prototype robot.

1 Jan 09, 2022
Cytotron - A unique discord bot like never before. Add it to your server to keep it active, motiviated, and amazing!!

Cytotron - Take your server to the next level Most of the details are in the website. Go to https://cytotron-bot.gq for more information. If that link

LeviathanProgramming 6 Jun 13, 2021
Opasium AI was specifically designed for the Opasium Games discord only. It is a bot that covers the basic functions of any other bot.

OpasiumAI Opasium AI was specifically designed for the Opasium Games discord only. It is a bot that covers the basic functions of any other bot. Insta

Dan 3 Oct 15, 2021
Lamblayer: a minimal deployment tool for AWS Lambda layers

lamblayer lamblayer is a minimal deployment tool for AWS Lambda layers. lamblayer does, Create a Layers of built pip-installable python packages. Crea

Yusuke Takahashi 2 Aug 19, 2022
A discord http interactions framework built on top of Sanic

snowfin An async discord http interactions framework built on top of Sanic Installing for now just install the package through pip via github # Unix b

kaj 13 Dec 15, 2022
NekoRobot-2 - Neko is An Anime themed advance Telegram group management bot.

NekoRobot A modular telegram Python bot running on python3 with an sqlalchemy, mongodb database. ╒═══「 Status 」 Maintained Support Group Included Free

Lovely Boy 19 Nov 12, 2022
One of the best Telegram renamer bot with many new features

Renamer-Bot I think this repo gonna become one of the best renamer open source 🥰 . Please Give a ⭐ if you like this repo and also try following me fo

Ns Bots 97 Jan 06, 2023
DiscWrappy - A Python wrapper for the Discord bot API

DiscWrappy - A Python wrapper for the Discord bot API

Jeff Morris 4 Apr 25, 2022
Discord bot for calculating basic operations and formulas. (Early Development)

MathBot Discord bot for calculating basic operations and formulas. (Early Development) Commits Feel free to contribute to this bot by forking and pull

4 Jul 14, 2022
Template to create a telegram bot in python

Template for Telegram Bot Template to create a telegram bot in python. How to Run First add src to PYTHONPATH: export PYTHONPATH=${PWD} Then run: pyt

Ali Hejazizo 12 Dec 24, 2022
KiKi bare dogs can share your joys and sorrows with you.

Kiki-FangLee-DiscordBot KiKi bare dogs can share your joys and sorrows with you. $help: Kiki will show you my talent, aw-aw. $list: Show Kiki's knowle

Fang Lee 0 Feb 12, 2022