elephantrobotics/mycobot_ros

test.py not working with my mycobot pi I just receieved.

mukmalone opened this issue · 2 comments

Hi, I'm trying to get test.py to work.

So far I changed the port to /dev/ttyAMA0 and am not getting any errors but nothing happens.

Here is the output:
`ubuntu@ubuntu:~/catkin_ws/src/mycobot_ros$ python test.py
Start check api

::get_angles()
==> degrees: []

::get_radians()
==> radians: []

::send_angles()
==> set angles [0,0,0,0,0,0], speed 80

Is moving: -1
::send_radians
==> set raidans [1,1,1,1,1,1], speed 70

::send_angle()
==> angle: joint2, degree: 10, speed: 50

::get_coords()
==> coords []

::send_coords()
==> send coords [160,160,160,0,0,0], speed 70, mode 0

-1
::send_coord()
==> send coord id: X, coord value: -40, speed: 70

::release_all_servos()
==> into free moving mode.
=== check end <==`

Any help is greatly appreciated! Let me know if you need more details.

Hi, I'm doing some further troubleshooting.

RobotFlow_Mycobot program seems to work well and I'm able to connect and move the robot.

myblockly when I go to the tools I am not able to read the joints or move the robot:
image

Issue solved. When defining MyCobot the code forgot to pass the baud rate.

This properly sets everything up:
port = "/dev/ttyAMA0"
baud = 1000000
mycobot = MyCobot(port, baud)