3.6. Mechanical Arm¶
-
robotic_arm_ctrl.
move
(x, y, wait_for_complete=True)¶ Description: Sets the relative movement position of the mechanical arm
Parameters: - x (int32) – Set the horizontal movement distance of the mechanical arm. A positive number indicates forward movement, and a negative number indicates backward movement. The accuracy is 1 mm.
- y (int32) – Set the vertical movement distance of the mechanical arm. A positive number indicates upward movement, and a negative number indicates downward movement. The accuracy is 1 mm.
- wait_for_complete (bool) – Whether to wait for execution to be completed. The default value is True.
Returns: None
Example: robotic_arm_ctrl.move(40, 50, True)
Example description: Set the mechanical arm to move 20 mm forward and 30 mm upward, and wait for execution to be completed
-
robotic_arm_ctrl.
moveto
(x, y, wait_for_complete=True)¶ Description: Sets the absolute coordinates of mechanical arm movement
Parameters: - x (int32) – Set the coordinates of horizontal arm movement, with an accuracy of 1 mm
- y (int32) – Set the coordinates of vertical arm movement, with an accuracy of 1 mm
- wait_for_complete (bool) – Whether to wait for execution to be completed. The default value is True.
Returns: None
Example: robotic_arm_ctrl.moveto(40, 50, True)
Example description: Set the absolute coordinates of the mechanical arm to (x=40mm, y=50mm) and wait for the execution to be completed
-
robotic_arm_ctrl.
get_position
()¶ Description: Obtains the position of the mechanical arm Parameters: void – None Returns: The absolute coordinates of the mechanical arm, with an accuracy of 1 mm Return type: An [x, y] list, where x and y are of int32 type Example: [x, y] = robotic_arm_ctrl.get_position()
Example description: Obtain the absolute coordinates of the mechanical arm
-
robotic_arm_ctrl.
recenter
()¶ Description: Recenters the mechanical arm Parameters: void – None Returns: None Example: robotic_arm_ctrl.recenter()
Example description: Recenter the mechanical arm
Hint
For a description of the module, refer to Mechanical Arm and Mechanical Gripper.