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()
You might also like...
Program that uses Python to monitor grade updates in the Genesis Platform

Genesis-Grade-Monitor Program that uses Python to monitor grade updates in the Genesis Platform Guide: Install by either cloning the repo or downloadi

This program is an automated trading bot that uses TDAmeritrades Thinkorswim trading platform's scanners and alerts system.
This program is an automated trading bot that uses TDAmeritrades Thinkorswim trading platform's scanners and alerts system.

Python Trading Bot w/ Thinkorswim Description This program is an automated trading bot that uses TDAmeritrades Thinkorswim trading platform's scanners

This very basic script can be used to automate COVID-19 vaccination slot booking on India's Co-WIN Platform.

COVID-19 Vaccination Slot Booking Script This very basic CLI based script can be used to automate covid vaccination slot booking on Co-WIN Platform. I

A Telegram Bot which notifies the user when a vaccine is available on CoWin Platform.
A Telegram Bot which notifies the user when a vaccine is available on CoWin Platform.

Cowin Vaccine Availability Notifier Telegram Bot A bot that notifies the available vaccines at given district in realtime. Introduction • Requirements

Unofficial Discord Rich Presence for HackTheBox platform
Unofficial Discord Rich Presence for HackTheBox platform

HTBRichPresence Unofficial Discord Rich Presence for HackTheBox platform The project is under lazy development. How to run Install requirements: // I'

The official Magenta Voice Skill SDK used to develop skills for the Magenta Voice Assistant using Voice Platform!

Magenta Voice Skill SDK Development • Support • Contribute • Contributors • Licensing Magenta Voice Skill SDK for Python is a package that assists in

Image Tooᥣs Bot I specialize for logo design  Services with Amazing logo  Creator Platform and  more tools
Image Tooᥣs Bot I specialize for logo design Services with Amazing logo Creator Platform and more tools

Image Tooᥣs Bot I specialize for logo design Services with Amazing logo Creator Platform and more tools

A free, minimal, lightweight, cross-platform, easily expandable  Twitch IRC/API bot.
A free, minimal, lightweight, cross-platform, easily expandable Twitch IRC/API bot.

parky's twitch bot A free, minimal, lightweight, cross-platform, easily expandable Twitch IRC/API bot. Features 🔌 Connect to Twitch IRC chat! 🔌 Conn

A Terminal User Interface (TUI) for automated trading with Komodo Platform's AtomicDEX-API
A Terminal User Interface (TUI) for automated trading with Komodo Platform's AtomicDEX-API

PytomicDEX Makerbot A Terminal User Interface (TUI) for automated trading with Komodo Platform's AtomicDEX-API Install sudo apt install wget curl jq g

Owner
Agilex Robotics (Dongguan) CO,.ltd
null
Simple base for a telethon bot!

Telethon Bot Simple base used to make a Telegram Bot in telethon. Join @BotzHub! Note: The client, here, is named BotzHub. Fork and add your plugins t

Aditya 54 Oct 21, 2022
trading strategy for freqtrade crypto bot it base on CDC-ActionZone

ft-action-zone trading strategy for freqtrade crypto bot it base on CDC-ActionZone Indicator by piriya33 Clone The Repository if you just clone this r

Miwtoo 17 Aug 13, 2022
A ideia é fornecer uma base ampla de questões do ENEM como uma api REST

base10 "A ideia é fornecer uma base ampla de questões do ENEM como uma api REST" TODO Documentar a api com apifairy Criar testes Criar crawler para si

Wadson Garbes 4 Apr 24, 2022
A minimalist file manager for those who want to use Linux mobile devices.

Portfolio A minimalist file manager for those who want to use Linux mobile devices. Usage Tap to activate and press to select, to browse, open, copy,

Martin Abente Lahaye 71 Nov 18, 2022
Tracker to check the covid shot slot availability in India and send mobile alerts via Twilio Messaging Service.

Cowin-Slot-Tracker Tracker to check the covid vaccine slot availability in India and send mobile notifications through Twilio Messaging Service. Requi

invalid username 27 Nov 12, 2022
Faster Twitch Alerts is a highly customizable, lightning-fast alternative to Twitch's slow mobile notification system

Faster Twitch Alerts What is "Faster Twitch Alerts"? Faster Twitch Alerts is a highly customizable, lightning-fast alternative to Twitch's slow mobile

null 6 Dec 22, 2022
Python Package For MTN Zambia Momo API. This package can also be used by MTN momo in other countries.

MTN MoMo API Lite Python Client Power your apps with Lite-Python MTN MoMo API Usage Installation Add the latest version of the library to your project

Mathews Musukuma 7 Jan 1, 2023
Graviti-python-sdk - Graviti Data Platform Python SDK

Graviti Python SDK Graviti Python SDK is a python library to access Graviti Data

Graviti 13 Dec 15, 2022
The python SDK for Eto, the AI focused data platform for teams bringing AI models to production

Eto Labs Python SDK This is the python SDK for Eto, the AI focused data platform for teams bringing AI models to production. The python SDK makes it e

null 5 Apr 21, 2022
Python SDK for LUSID by FINBOURNE, a bi-temporal investment management data platform with portfolio accounting capabilities.

LUSID® Python SDK This is the Python SDK for LUSID by FINBOURNE, a bi-temporal investment management data platform with portfolio accounting capabilit

FINBOURNE 6 Dec 24, 2022