robotical / martypy Goto Github PK
View Code? Open in Web Editor NEWPython Library for interfacing with Marty the Robot by Robotical
License: Apache License 2.0
Python Library for interfacing with Marty the Robot by Robotical
License: Apache License 2.0
2nd argument, position
not taking reasonable range
Times out without discovering any martys
martypy does not handle variable length ROSSERIAL messages. Hence it is not currently possible to accommodate additional fields in these messages - which are added to the end of the message - without martypy breaking. martypy should be updated to accommodate variable length ROSSERIAL messages.
For instance this code - currently at line 162 in RICROSSerial.py:
def extractRobotStatus(cls, buf: bytes) -> Dict:
robotStat = struct.unpack(">BB", buf)
This fails if the size of buf is not exactly 2 bytes. It should be changed to something like (where cls.ROS_ROBOT_STATUS_BYTES is the number of bytes in the default size message)
if len(buf) >= cls.ROS_ROBOT_STATUS_BYTES:
robotStat = struct.unpack(">BBIIIIIBB", buf[0:cls.ROS_ROBOT_STATUS_BYTES])
Currently martypy
can't discover Martys, so people have to use http://docs.robotical.io/hardware/esp-socket-discovery/
Marty
has a discovery method, but it is not currently implemented within SocketClient
get_motor_current
passes on the motor ID as an int when, but the function receiving it expect a string
some motors report about 1.99 even when not moving
Can now take a mode, which will attempt to get Marty enabled and standing upright, regardless of starting position.
Does not return anything
Here is the code that I used:
from martypy import Marty
from time import sleep
m = Marty('socket://192.168.0.49')
m.enable_motors()
m.hello()
sleep(2)
while(1):
m.walk()
To reproduce:
Using MartySystemTests:
To change how far Marty leans when he walks
In the socket_client
, the function select_sensor
expects a number for index but get_accelerometer
passes a character.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.