from Robotic_Arm.rm_robot_interface import * armleft = RoboticArm(rm_thread_mode_e.RM_TRIPLE_MODE_E) lefthandle = armleft.rm_create_robot_arm("192.168.3.18", 8080) print("机械臂ID:", lefthandle.id) print("Left: ", armleft.rm_get_current_arm_state()) print("Left: ", armleft.rm_get_arm_all_state()) # armleft.rm_movej([-90, 90, 90, -90, -90, 90], 50, 0, 0, 1) # armleft.rm_movej([-90, 90, 90, -90, -90, 90], 50, 0, 0, 1) # armleft.rm_movej_p([-0.185, 0.315, 0.080, -1.500, -0.800, -0.000], 50, 0, 0, 1)s # armleft.rm_movel([-0.185, 0.315, 0.080, -1.500, -0.800, -0.000], 50, 0, 0, 1) print(armleft.rm_get_gripper_state()) # armleft.rm_set_gripper_pick(100, 500, True, 2) # armleft.rm_set_gripper_release(300, True, 2) # armleft.rm_set_gripper_pick(100, 500, True, 2) # armleft.rm_set_gripper_position(500, True, 20) # armleft.rm_set_gripper_pick(100, 500, True, 2) # armleft.rm_set_gripper_position(500, True, 20) # armleft.rm_set_gripper_position(999, True, 2) import time time.sleep(3) # armleft.rm_set_gripper_position(1, True, 2) # 断开所有连接,销毁线程 RoboticArm.rm_destory()