|
| 1 | +from pymycobot.mycobotsocket import MyCobotSocket |
| 2 | +import time |
| 3 | +m = MyCobotSocket("192.168.10.115", "/dev/ttyAMA0", "1000000") |
| 4 | +# m.send_command("send_angles([0,0,0,0,0,0],40)") |
| 5 | +# m.send_command("power_on") |
| 6 | +# print(m.send_command("is_power_on")) |
| 7 | +# m.send_command("release_all_servos") |
| 8 | +# print(m.send_command("is_controller_connected")) |
| 9 | +# m.send_command("send_angles([0,0,0,0,0,0],30)") |
| 10 | +# m.send_command("send_angle(1,100,30)") |
| 11 | +print(m.send_command("get_coords")) |
| 12 | +# print(m.send_command("get_coords")) |
| 13 | +# m.send_command("send_coords([59.2,-52.4,231.5,169.03,15.64,-91.2],20,1)") |
| 14 | +# print(m.send_command( |
| 15 | +# "is_in_position([59.2,-52.4,231.5,169.03,15.64,-91.2],1)")) |
| 16 | +# m.send_command("jog_coord(1,0,20)") |
| 17 | +# print(m.send_command("release_servo(2)")) |
| 18 | +# m.send_command("sync_send_angles([0,0,0,0,0,0],30)") |
| 19 | +# m.send_command("sync_send_angles([100,0,0,0,0,0],30)") |
| 20 | +# m.send_command( |
| 21 | +# "sync_send_coords([59.2,-52.4,231.5,169.03,15.64,-91.2],30,1)") |
| 22 | +# m.send_command( |
| 23 | +# "sync_send_coords([53,53,412,-90.7,-1.5,12.67],30,1)") |
| 24 | +# print(m.send_command("is_in_position([53,53,412,-90.7,-1.5,12.67],1)")) |
| 25 | + |
| 26 | +# m.send_command("jog_angle(1,1,20)") |
| 27 | +# time.sleep(2) |
| 28 | +# m.send_command("jog_stop") |
0 commit comments