Robotics StackExchange | Archived questions

ur modern driver raw data

Hi, I am using the urmoderndriver to control my ur10 robot arm in ROS kinetic. I can see the end effector position and angles (in quaternion) by echoing /tf, however, I wonder if there is a way to get the original roll, pitch and yaw angles that are published by the robot before converting them into quaternion in the ros driver (i.e. I want to display the raw data that is coming from the robot). The reason I am doing so is that I noticed that the roll, pitch and yaw of the robot (that can be seen from the robot monitor) are not the same as the ones published in the driver at some poses (try converting the roll, pitch and yaw angles manually you will get different ones that are produced by the driver)

Thanks in advance. Ragahd

Asked by raghad.husari on 2019-02-19 08:15:20 UTC

Comments

Which frame pair are you looking at? If it's base_link->ee_link, then it is to be expected that you don't get the values that are shown on the teach pendant.

Asked by gvdhoorn on 2019-02-20 03:17:58 UTC

no, I am looking at tool0_controller frame

Asked by raghad.husari on 2019-02-24 00:38:00 UTC

Answers

The values you see in TF will be calculated from the joint angles and known model of the robot, not just converted from RPY values provided directly from the driver. Roll Pitch and Yaw is not the recommended way to transfer orientation information.

The reason my Euler angles are not preferred is because there are 12 different permutations of rotation orderings meaning conversions between different systems can be problematic, it's possible this is exactly what's occurring in this case. It's also possible that the fixed base frame being used by the robot monitor may be different to that being used in ROS.

In short this is not a simple problem, and unless you can find out the rotation ordering used the Euler angle representation used by the UR robot console it's going to be hard to replicate.

Asked by PeteBlackerThe3rd on 2019-02-19 13:12:01 UTC

Comments

Thanks for your reply. I just want to know if there is a way to access and print the raw data from the driver (where exactly the parsing is happening). I want to see the data that is coming from the robot arm itself.

Asked by raghad.husari on 2019-02-20 03:08:49 UTC

"The values you see in TF will be calculated from the joint angles and known model of the robot, not just converted from RPY values provided directly from the driver." The UR provides a more accurate pose for the TCP (using a hidden factory calibration), so this is only correct for all other joints.

Asked by NEngelhard on 2019-02-20 04:10:01 UTC

I wonder if there is a way to get the original roll, pitch and yaw angles that are published by the robot before converting them into quaternion in the ros driver (i.e. I want to display the raw data that is coming from the robot).

No, there is no way to do that with the default ur_modern_driver.

But note though: FK is performed by robot_state_publisher, not ur_modern_driver. So ur_modern_driver does not actually publish any Cartesian info, unless you are referring to the tool0_controller frame.

The reason I am doing so is that I noticed that the roll, pitch and yaw of the robot (that can be seen from the robot monitor) are not the same as the ones published in the driver at some poses (try converting the roll, pitch and yaw angles manually you will get different ones that are produced by the driver)

If that is the case then I would say that is a bug, as the conversion should always be correct.

But do note @NEngelhard's comment: robot_state_publisher uses straightforward FK based on joint angles (published by ur_modern_driver) and the URDF. As that does not take any calibration into account ( @NEngelhard: the calibration is not actually hidden, it's just not used) the tool0 frame will not be completely coincident with the robot's TCP.

tool0_controller however should be identical though, as it's a straight conversion from the data broadcast by the robot controller.


Note that the new driver (for CB3 and up) that was announced by Universal Robots at the last ROS-Industrial EU conference (2018, Stuttgart) will take the calibration data into account.

Asked by gvdhoorn on 2019-03-04 03:23:27 UTC

Comments

"the calibration is not actually hidden" I found the DH-parameters, but we didn't manage to reproduce the tool0_controller. Did you have more success?

Asked by NEngelhard on 2019-03-04 08:22:11 UTC

Yes, but it's not trivial, as using those values in a URDF requires some data transformations.

Note: you will not get tool0_controller exactly though, as the robot does a bit more than compensate for kinematic offsets.

Using the calibration will be supported by the new driver, as I wrote above.

Asked by gvdhoorn on 2019-03-04 08:24:06 UTC