After ur_calibration wrong robot pose is shown in RViZ

Dear UR Community!

I would like to control our UR5 robot with the official ROS driver.

The setup and building steps are executed without any problems. I was able to succesfully communicate with the robot over the network. However, after the ur_calibration step the robot pose shown in RViZ is totally different than the robot pose in reallity.
I will try to summarize everything as follows.

  1. The robot pose in the reallity is shown below:
    Dropbox - IMG_20211027_090903_resize2.jpg - Simplify your life
    Dropbox - IMG_20211027_091814_resize2.jpg - Simplify your life

  2. After launching

roslaunch ur_calibration calibration_correction.launch \
robot_ip:= \
target_filename:="$(rospack find example_organization_ur_launch)/etc/ex-ur5-1_calibration.yaml"

I get the following yaml file:

    x: 0
    y: 0
    z: 0.08948760745641905
    roll: -0
    pitch: 0
    yaw: 5.724267271354014e-05
    x: 4.767387894761116e-05
    y: 0
    z: 0
    roll: 1.569913581252249
    pitch: 0
    yaw: 2.121784526601501e-05
    x: -0.4254051262210206
    y: 0
    z: 0
    roll: 3.141571256638476
    pitch: 3.139609714587363
    yaw: 9.181814845231772e-05
    x: -0.392460380822819
    y: -0.002312531082237207
    z: 0.1097805113913582
    roll: 0.02106192704769751
    pitch: -0.001508302033929348
    yaw: 3.141509032753284
    x: 7.021751572921595e-05
    y: -0.09475180859812876
    z: -0.0003085072123167084
    roll: 1.574052265934258
    pitch: 0
    yaw: -3.378771318114996e-05
    x: -4.120584958757715e-05
    y: 0.0824868794107365
    z: -0.0002106126115580783
    roll: 1.568243046135182
    pitch: 3.141592653589793
    yaw: -3.141583455241135
  hash: calib_2261225183801150179
  1. Then, I bringup the ur5 with it’s launch file and the aforementioned kinematics yaml file. The RVIZ shows a totally different robot pose, however the joint angles are the same as on the TP. See the image below. (I’m a new user, and i cannot post more links)

  2. I even checked the tool pose with a transform listener, and i got again different values than in the TP. See the image below.
    (I’m a new user, and i cannot post more links)

Can you give hints where can be the problem?

Thank you in advance.
Best regards.

See the image for the second step:

See the image for the third step:

Have you checked one of the following issues?

tool0_controller comes from the robot_controller and tool0 from the forward kinematics. If your calibration is correct, those two should align.

It might be interesting where the intermediate TFs are actually located in RViz