This commit is contained in:
2929ss 2022-08-11 19:04:40 +08:00
parent 06bc833154
commit 927c923351
2 changed files with 6 additions and 6 deletions

View file

@ -162,7 +162,7 @@ class Object_detect(Movement):
# self.mc.send_coords([x, y, 150, 179.87, -3.78, -62.75], 25, 0)
# time.sleep(3)
self.mc.send_coords([x, y, 105, 179.87, -3.78, -62.75], 25, 0)
self.mc.send_coords([x, y, 96, 179.87, -3.78, -62.75], 25, 0)
time.sleep(3)
# open pump
@ -182,7 +182,7 @@ class Object_detect(Movement):
# print(tmp)
self.mc.send_angles([tmp[0], -0.71, -54.49, -23.02, -0.79, tmp[5]],25) # [18.8, -7.91, -54.49, -23.02, -0.79, -14.76]
time.sleep(3)
time.sleep(4)
self.pub_marker(
self.move_coords[2][0]/1000.0, self.move_coords[2][1]/1000.0, self.move_coords[2][2]/1000.0)

View file

@ -4,9 +4,9 @@ from pymycobot.genre import Angle
from pymycobot import PI_PORT, PI_BAUD # 当使用树莓派版本的mycobot时可以引用这两个变量进行MyCobot初始化
import time
# mc = MyCobot("/dev/ttyACM0", 115200)
mc = MyCobot("/dev/ttyACM0", 115200)
# mc = MyCobot("/dev/ttyUSB0", 115200)
mc = MyCobot("/dev/ttyAMA0", 1000000)
# mc = MyCobot("/dev/ttyAMA0", 1000000)
mc.send_angles([0,0,0,0,0,0], 25)
# print(mc.get_angles())
@ -35,8 +35,8 @@ mc.send_angles([0,0,0,0,0,0], 25)
# mc.release_all_servos()
# mc.release_servo(1)
# mc.set_servo_calibration(1)
# mc.release_servo(3)
# mc.set_servo_calibration(3)
# time.sleep(1)
# while True:
# print("angles:%s"% mc.get_angles())