<<<<<<< HEAD
Door-type movement
=======
门型移动
482c782c42e70f0b2e44445345f6461e795f9189 ```python from pymycobot import ultraArmP340,utils import time
<<<<<<< HEAD grab_point=[217.26, 68.87, 8.0, 27.0]#Grab point coordinates place_point=[217.26, -114.13, 10.0, 27.0]#Placement point coordinates
if name=="main": arm=ultraArmP340(utils.get_port_list()[0]) arm.set_angles([0,0,0,0],100)#Return to joint zero point time.sleep(2) arm.set_coords([grab_point[0],grab_point[1],grab_point[2]+50,grab_point[3]],100)#Move to 50mm above the grab point time.sleep(2) arm.set_coords([grab_point[0],grab_point[1],grab_point[2],grab_point[3]],100)#Move to the grab point time.sleep(2) arm.set_coords([grab_point[0],grab_point[1],grab_point[2]+50,grab_point[3]],100)#Move to 50mm above the grab point time.sleep(2)
arm.set_coords([place_point[0],place_point[1],place_point[2]+50,place_point[3]],100)#Move to 50mm above the placement point
time.sleep(2)
arm.set_coords([place_point[0],place_point[1],place_point[2],place_point[3]],100)#Move to the placement point
time.sleep(2)
arm.set_coords([place_point[0],place_point[1],place_point[2]+50,place_point[3]],100)#Move to 50mm above the placement point
time.sleep(2)
## Notes
After the robot arm is turned on, it must be zeroed before executing the subsequent tasks. The following code can be used to return to zero
=======
grab_point=[217.26, 68.87, 8.0, 27.0]#抓取点坐标
place_point=[217.26, -114.13, 10.0, 27.0]#放置点坐标
if __name__=="__main__":
arm=ultraArmP340(utils.get_port_list()[0])
arm.set_angles([0,0,0,0],100)#回到关节零点
time.sleep(2)
arm.set_coords([grab_point[0],grab_point[1],grab_point[2]+50,grab_point[3]],100)#运动到抓取点上方50mm
time.sleep(2)
arm.set_coords([grab_point[0],grab_point[1],grab_point[2],grab_point[3]],100)#运动到抓取点
time.sleep(2)
arm.set_coords([grab_point[0],grab_point[1],grab_point[2]+50,grab_point[3]],100)#运动到抓取点上方50mm
time.sleep(2)
arm.set_coords([place_point[0],place_point[1],place_point[2]+50,place_point[3]],100)#运动到放置点上方50mm
time.sleep(2)
arm.set_coords([place_point[0],place_point[1],place_point[2],place_point[3]],100)#运动到放置点
time.sleep(2)
arm.set_coords([place_point[0],place_point[1],place_point[2]+50,place_point[3]],100)#运动到放置点上方50mm
time.sleep(2)
注意事项
机械臂开机后,必须先进行一次回零才可以执行后面的任务,可使用下面代码进行回零
482c782c42e70f0b2e44445345f6461e795f9189 ```python from pymycobot import ultraArmP340,utils
if name=="main": arm=ultraArmP340(utils.get_port_list()[0]) arm.go_zero() <<<<<<< HEAD
=======
482c782c42e70f0b2e44445345f6461e795f9189