# ur5 different notions of goal points in simulator and robot

Hi,

I am using MoveIt move_group_interface for simple motion plans. I simulate the motions within rviz and also on the robotic arm. For a joint-space goal, I can see the trajectories following the similar paths within the simulator and also on the robotic arm. I can validate by checking on the panel what are the final joint angles and comparing them with the joint-space goal that was specified in my program and sent to the robotic arm.

However, for a pose goal, the end-pose-point seems to be very different in each (simulator and the robotic arm). My thinking was that measurements were taken from the center of the base_link of the robotic arm. Which means, that the center of the base_link of the arm is at position (0,0,0) and then with respect to it, we calculate the position of the end-effector. In rviz, that seems right, by visual inspection we can see that it is correct. However, on the actual robotic arm, it seems to be very different.

The urdf file of the universal robot UR5 has the following entry.

  <link name="world"/>
<joint name="world_joint" type="fixed">
<origin rpy="0.0 0.0 0.0" xyz="0.0 0.0 0.0"/>
</joint>


running check_urdf on UR5 urdf model, I received the following:

---------- Successfully Parsed XML ---------------
root Link: world has 1 child(ren)
child(1): base
child(2): tool0


Within my program, when I run

// print the name of the reference frame for this robot.
ROS_INFO("Reference frame: %s", move_group.getPlanningFrame().c_str());
ROS_INFO("Reference frame: %s", move_group.getPoseReferenceFrame().c_str() );


[ INFO] [1612451933.731128388]: Reference frame: world
[ INFO] [1612451933.731204911]: Reference frame: world


From the urdf file, it appears that world is a fixed frame, and if the pose goals (x, y, z) points are given with reference to the base link of the robotic arm, it should be ok to specify them as such and our program should be able to plan movements to these goals while being working in the world frame. Is this correct ? Within the simulator this seems ok, but on the robotic arm itself, the destination of the trajectory is not the intended one. What is the problem. Do I need to manually do some transforms from the world to the base_link reference frame? Is there a mapping difference concerning ur5 robotic arm.

edit retag close merge delete

The only way in which the values you read on the teach pendant are going to correspond to RViz/MoveIt is by using the base -> tool0 transform (provided you have configured the real robot with an all-zeros toolframe).

base_link does not have the same orientation as the Base frame on the real robot, leading to 'mirrored poses'.

yes, that's what the 180 degree rotation about Z would do. The base frame is orientated exactly as the Base frame defined by the controller. So poses relative to that frame should show the same values as the TP.