ur_calibration results in different robot pose in ROS than in reallity

asked 2021-11-02 12:07:58 -0500

akosodry gravatar image

updated 2021-11-06 13:07:01 -0500

Hi ROS community. I've already asked this question here , however no answer was arrived therefore i'm trying to ask here the same thing.

I'm using an UR5 robot with the official ROS wrapper. The setup is straightforward, i'm able to communicate with the robot, send follow_joint_trajectory goals and move the real robot from ROS, but ONLY IF i skip the ur_calibation step (see the link).

If i execute the calibration, then basically the outcome is that robot has totally different pose in ROS than in reallity, i.e., if i check the robot in RViZ i see a totally different pose (joint configuration) then the real robot has in front of me.

Did anyone face this kind of problem? I summarize below the steps i executed.

1.The robot pose in reallity is the following:

see the robot

see the TP

2.I launch the calibation extraction with the launch file:

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

and i get a nice calibration yaml file:

kinematics:
  shoulder:
    x: 0
    y: 0
    z: 0.08948760745641905
    roll: -0
    pitch: 0
    yaw: 5.724267271354014e-05
  upper_arm:
    x: 4.767387894761116e-05
    y: 0
    z: 0
    roll: 1.569913581252249
    pitch: 0
    yaw: 2.121784526601501e-05
  forearm:
    x: -0.4254051262210206
    y: 0
    z: 0
    roll: 3.141571256638476
    pitch: 3.139609714587363
    yaw: 9.181814845231772e-05
  wrist_1:
    x: -0.392460380822819
    y: -0.002312531082237207
    z: 0.1097805113913582
    roll: 0.02106192704769751
    pitch: -0.001508302033929348
    yaw: 3.141509032753284
  wrist_2:
    x: 7.021751572921595e-05
    y: -0.09475180859812876
    z: -0.0003085072123167084
    roll: 1.574052265934258
    pitch: 0
    yaw: -3.378771318114996e-05
  wrist_3:
    x: -4.120584958757715e-05
    y: 0.0824868794107365
    z: -0.0002106126115580783
    roll: 1.568243046135182
    pitch: 3.141592653589793
    yaw: -3.141583455241135
  hash: calib_2261225183801150179

3.Then, I bringup the ur5 with it’s launch file and the aforementioned kinematics yaml file. Then RVIZ shows a totally different robot pose than the configuration the robot has in reallity, however the joint angles are the same as on the TP. See the image

4.I even checked the tool pose with a transform listener, and i got again different values than in the TP. See the image

Can you give some hints where can be the problem?

UPDATE: I checked another two different poses. POSE1:

Reallity: Pose1 in reallity

Corresponding pose in RViZ: Pose1 in RViZ

POSE2: Reallity: Pose2 in reallity

Corresponding pose in RViZ: Pose2 in RViZ

MY OBSERVATION There is a PI offset for joint_3 and also PI offset for joint_4. Am I correct? Looking at the kinematics.yaml file above, there are lof of PI values. Also these calibration values seems to be quite large for me. Is it possible that the robot was wrongly calibrated?

Thanks in advance. Best regards.

edit retag flag offensive close merge delete

Comments

I don't know what causes this, but re: "transform listener": you cannot compare base_link->tool0 to your TP.

For one: you have View active on the TP. That shows you a convenient rendering of the robot with an arbitrary viewpoint which you drag around. The values shown are relative to that viewpoint. Your TF does not work that way, so those values won't match.

Second: base_link does not correspond to UR's Base frame. The only frame in your URDF which would correspond to that would be base. So you should be looking at base -> tool0.

And even then, that transform will only match if you have an "all zeros" toolframe configured on the UR controller.

And only if you have the TP set to Base view.

See also Universal_Robots_ROS_Driver#468.

And some things to check:

  • you're using the correct .launch file
  • you're not actually connecting ...
(more)
gvdhoorn gravatar image gvdhoorn  ( 2021-11-02 13:31:29 -0500 )edit

Also: please attach your images directly to the question. You have more than enough karma to do that.

Don't link to external sites for images. Your question should be stand-alone.

I'm going to close your question for not following the support guidelines until you fix it. And then we can re-open.

You don't need to post a new question, just edit your current one. You can use the edit button/link for that.

gvdhoorn gravatar image gvdhoorn  ( 2021-11-02 13:32:49 -0500 )edit

@gvdhoorn thank you for the comments. Yes I have all zeros at the TCP configuration. But I will check the Base view as well.

Nevertheless, the problem is that if ur_calibration step is skipped, then robot pose is the same in both ROS and reality, otherwise as i mentioned totally different pose is shown..

Regarding the base_link issue: i used the base_link so far as my reference (when calibration was skipped) and it was relevant to me (robot pose, planning, motion execution), but i will also check the difference with base.

And yes, i'm launching the correct launch file. UR-Sim: i don't even use the UR simulation environment.

I will come back next week Monday to these issues.

akosodry gravatar image akosodry  ( 2021-11-03 04:15:26 -0500 )edit

Nevertheless, the problem is that if ur_calibration step is skipped, then robot pose is the same in both ROS and reality, otherwise as i mentioned totally different pose is shown..

no.

That's a symptom.

We don't know what the problem (ie: cause) is.

gvdhoorn gravatar image gvdhoorn  ( 2021-11-03 04:20:24 -0500 )edit

And there may be something special about your robot or the process you follow.

I would suggest posting on the issue tracker.

Do mention you've already posted here and on the UR forums, so we can avoid splitting discussions.

gvdhoorn gravatar image gvdhoorn  ( 2021-11-03 04:22:36 -0500 )edit

@gvdhoorn Hi! I updated the post with two more poses, and i recognized some joint offsets. Can you check the update? Thank you in advance!

akosodry gravatar image akosodry  ( 2021-11-06 13:07:53 -0500 )edit

As I wrote earlier: please post this on the issue tracker of the respective package.

You could be running into some issues due to either your robot being an "outlier", or something else. This doesn't seem to be a configuration issue any more.

gvdhoorn gravatar image gvdhoorn  ( 2021-11-07 08:54:20 -0500 )edit