Door-type movement

from pymycobot import ultraArm,utils
import time

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=ultraArm(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

from pymycobot import ultraArm,utils

if __name__=="__main__":
    arm=ultraArm(utils.get_port_list()[0])
    arm.go_zero()

results matching ""

    No results matching ""