update aikit_color.py,aikit_img.py

This commit is contained in:
weijian 2022-12-09 15:34:55 +08:00
parent 597d321091
commit 69912d2ceb
2 changed files with 5 additions and 4 deletions

View file

@ -161,7 +161,7 @@ class Object_detect(Movement):
time.sleep(3)
# send coordinates to move mycobot
self.mc.send_coords([x, y, 190.6, 179.87, -3.78, -62.75], 25, 1) # usb :rx,ry,rz -173.3, -5.48, -57.9
self.mc.send_coords([x, y, 170.6, 179.87, -3.78, -62.75], 25, 1) # usb :rx,ry,rz -173.3, -5.48, -57.9
time.sleep(3)
# self.mc.send_coords([x, y, 150, 179.87, -3.78, -62.75], 25, 0)
@ -187,7 +187,8 @@ 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(2.5)
time.sleep(3)
self.pub_marker(self.move_coords[2][0]/1000.0, self.move_coords[2][1]/1000.0, self.move_coords[2][2]/1000.0)
self.mc.send_coords(self.move_coords[color], 25, 1)
@ -217,7 +218,7 @@ class Object_detect(Movement):
# decide whether grab cube 决定是否抓取立方体
def decide_move(self, x, y, color):
print('decide-->',x, y, self.cache_x, self.cache_y)
print(x, y, self.cache_x, self.cache_y)
# detect the cube status move or run 检测立方体状态移动或运行
if (abs(x - self.cache_x) + abs(y - self.cache_y)) / 2 > 5: # mm
self.cache_x, self.cache_y = x, y

View file

@ -143,7 +143,7 @@ class Object_detect(Movement):
# Grasping motion
def move(self, x, y, color):
# send Angle to move mypal260
# send Angle to move mycobot 280
self.mc.send_angles(self.move_angles[1], 25)
time.sleep(3)