Why the robot performs the same when I adjust the Roll and Yaw?

It normally happens when the Pitch=±90°, it's the gimbal lock, there are 2 typical features of gimbal lock on robotic arm.

1. When the robot at a pos of Pitch=±90°, adjusting the Roll of the robot will get the same result with adjusting the Yaw. You can by pass this issue by switching to the the "Tool Coordinate"on xArm Studio, or use the "set_tool_position" of the xArm Python or C++ SDK.

2. When the robot at a pos of Pitch=±90°, the robot will report a different Roll and Yaw with the pos you sent to the robot, but (Roll_send-Roll_report)+(Yaw_send-Yaw_report)=0 or ± 360°

Here is an example to show the feature (1).

  • Move your xArm robot to [450,0,112,0,90,180]

  • Press the Yaw+/- button of the xArm Studio Live Control page and observed the movement of the robot.

  • Press the Roll+/- button of the xArm Studio Live Control page and observed the movement of the robot.

Here is a video to show the result

Here is an example to show the feature 2

  • Move your xArm robot to [450,0,112,0,90,180]

  • Send pos [450,0,112,-80,90,-170] to the robot.

  • Check the pos of the robot, it's [ 450,0,112,100,90,10], you will find (Roll_send-Roll_report)+(Yaw_send-Yaw_report)=(-80-100)+(-170-10)= -360°

Note: If you are using xArm5, no worry about this problem.

If you'd like know more about gimbal lock, see the page of WIKIPEDIA

Did this answer your question?