mirror of
https://github.com/elephantrobotics/mycobot_ros.git
synced 2026-07-05 19:47:04 +00:00
update
This commit is contained in:
parent
0545d04876
commit
c370f43098
4 changed files with 17 additions and 13 deletions
|
|
@ -162,7 +162,7 @@ class Object_detect(Movement):
|
|||
self.mc.send_coords([x, y, 140, 179.12, -0.18, 179.46], 30, 0)
|
||||
time.sleep(3)
|
||||
|
||||
self.mc.send_coords([x, y, 92, 179.12, -0.18, 179.46], 30, 0) # -178.77, -2.69, 40.15
|
||||
self.mc.send_coords([x, y, 110, 179.12, -0.18, 179.46], 30, 0) # -178.77, -2.69, 40.15
|
||||
time.sleep(3)
|
||||
|
||||
# open pump
|
||||
|
|
|
|||
|
|
@ -6,13 +6,12 @@ from pymycobot.genre import Angle
|
|||
from pymycobot import PI_PORT, PI_BAUD # 当使用树莓派版本的mycobot时,可以引用这两个变量进行MyCobot初始化
|
||||
import time,os
|
||||
|
||||
# mc = MyPalletizer(os.popen("ls /dev/ttyUSB*").readline()[:-1], 115200)
|
||||
mc = MyCobot("/dev/ttyAMA0", 1000000)
|
||||
# mc = MyPalletizer("/dev/ttyAMA0", 1000000)
|
||||
mc = MyCobot(os.popen("ls /dev/ttyUSB*").readline()[:-1], 115200)
|
||||
# mc = MyCobot("/dev/ttyAMA0", 1000000)
|
||||
|
||||
|
||||
mc.send_angles([0,0,0,0,90,0],30) # coords:[95.6, 0.5, 166.4, 179.12, -0.18, 179.46]
|
||||
# mc.send_angles([-3.25, 17.22, -32.51, 2.37, 92.54, -36.21],30)
|
||||
mc.send_angles([0,0,0,0,90,0],20) # coords:[95.6, 0.5, 166.4, 179.12, -0.18, 179.46]
|
||||
# # mc.send_angles([-3.25, 17.22, -32.51, 2.37, 92.54, -36.21],30)
|
||||
|
||||
time.sleep(4)
|
||||
|
||||
|
|
@ -41,7 +40,10 @@ time.sleep(4)
|
|||
# print("\n")
|
||||
|
||||
# mc.release_all_servos()
|
||||
# mc.release_servo(3)
|
||||
# mc.set_servo_calibration(1)
|
||||
# mc.set_servo_calibration(2)
|
||||
# mc.set_servo_calibration(3)
|
||||
# mc.set_servo_calibration(4)
|
||||
# mc.set_servo_calibration(4)
|
||||
# mc.set_servo_calibration(5)
|
||||
# mc.set_servo_calibration(6)
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ class Object_detect(Movement):
|
|||
if "dev" in self.robot_m5:
|
||||
self.Pin = [2, 5]
|
||||
elif "dev" in self.robot_wio:
|
||||
self.Pin = [20, 21]
|
||||
self.Pin = [2, 5]
|
||||
for i in self.move_coords:
|
||||
i[2] -= 20
|
||||
elif "dev" in self.robot_raspi or "dev" in self.robot_jes:
|
||||
|
|
|
|||
|
|
@ -4,13 +4,15 @@ from pymycobot.genre import Angle
|
|||
from pymycobot import PI_PORT, PI_BAUD # 当使用树莓派版本的mycobot时,可以引用这两个变量进行MyCobot初始化
|
||||
import time
|
||||
|
||||
mc = MyCobot("/dev/ttyACM0", 115200)
|
||||
# mc = MyCobot("/dev/ttyUSB0", 115200)
|
||||
# mc = MyCobot("/dev/ttyACM0", 115200)
|
||||
mc = MyCobot("/dev/ttyUSB0", 115200)
|
||||
# mc = MyCobot("/dev/ttyAMA0", 1000000)
|
||||
|
||||
# mc.send_angles([0,0,0,0,90,0], 20)
|
||||
# mc.send_angles([0,0,0,0,0,0], 25)
|
||||
# print(mc.get_angles())
|
||||
mc.send_angles([-7.11, -6.94, -55.01, -24.16, 0.0, -15], 30)
|
||||
time.sleep(4)
|
||||
# print(mc.get_angles())
|
||||
|
||||
# mc.send_coords([120.8, -134.4, 258.0, -172.72, -5.31, -109.09], 30, 1) # red bucket
|
||||
# time.sleep(4)
|
||||
|
|
@ -28,8 +30,8 @@ time.sleep(4)
|
|||
# mc.send_angles([1.4, 0, -53.61, -33.39, -3.51, -20.3],20)
|
||||
# time.sleep(3)
|
||||
|
||||
mc.send_coords([145.3, -11.2, 126.6, 179.87, -3.78, -62.75], 30, 1)
|
||||
time.sleep(6)
|
||||
# mc.send_coords([145.3, -11.2, 126.6, 179.87, -3.78, -62.75], 30, 1)
|
||||
# time.sleep(6)
|
||||
|
||||
|
||||
# mc.release_all_servos()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue