CommonplaceRobotics / iRC_ROS

ROS2 packages for the igus Robot Control
Apache License 2.0
15 stars 7 forks source link

Misalignment rebel v00 joints 2 and 3 upon launch #77

Closed JHeuverRiwo closed 1 year ago

JHeuverRiwo commented 1 year ago

Our Rebel 6DOF version 00 seems to be properly aligned when using the urdf for the "pre" version, so when starting the bringup with the rebel_version=00 argument we're seeing a 30 degree misalignment in joints 2 and 3.

We're on the commit "Fix losing LaunchConfigurations with EventHandlers for top level launch files" using CRI with this test; using ros2 humble, and Ubuntu 22.04.

cpr-fer commented 1 year ago

Thanks for bringing that to my attention!

With alignment you mean the relationship between the real robot an the visualisation or the axis positions for setting all values to 0? The 30 degrees difference between the pre and 00 are supposed to be there as the 0 position is defined differently. I am unsure if CRI/EmbeddedControl compensates the offset itself as well. I will ask a colleague tomorrow and if that is the case i'll have to make some CRI specific changes later that day.

JHeuverRiwo commented 1 year ago

Yes, indeed: when I launch the launchfile for the v00 or v01the zero for the physical robot seems different than for the simulated robot. So when I for instance tell our robot to go to 0 (publishing to the joint_state_controller), it will be standing straight up, which seems to match up with how the pre model defined its 0, but at the same time in simulation we see a different position. Thanks for taking up the issues!

cpr-fer commented 1 year ago

So it turns out the CRI config for the 00 and 01 also contain the offsets for those axes, so both EmbeddedControl and the ROS description files are applying their 30 degrees correction. I think the best way to fix this would be to check the configuration files for EmbeddedCtrl and subtract that correction beforehand to nullify the effect via a protocol specific parameter. The angles should be consistent from the ros users perspecitve between the two protocols and the correction should only be applied in the hardware interface

cpr-fer commented 1 year ago

@JHeuverRiwo The linked PR should fix this, I'll try to test it today or latest tomorrow with a ReBeL before merging