[JSB] added fixes to mantain the joint names order#1572
[JSB] added fixes to mantain the joint names order#1572bmagyar merged 22 commits intoros-controls:masterfrom
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1572 +/- ##
==========================================
+ Coverage 85.06% 85.10% +0.03%
==========================================
Files 123 123
Lines 11712 11719 +7
Branches 998 996 -2
==========================================
+ Hits 9963 9973 +10
+ Misses 1434 1433 -1
+ Partials 315 313 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
christophfroehlich
left a comment
There was a problem hiding this comment.
Shouldn't it now just use the order of the joints defined in the URDF, if we use the auto-export of the state interfaces? But with the example_1 one gets
$ ros2 topic echo /joint_states --once
header:
stamp:
sec: 1741554154
nanosec: 735820900
frame_id: ''
name:
- joint2
- joint1
position:
- 0.0
- 0.0
velocity:
- .nan
- .nan
effort:
- .nan
- .nan
If the joints parameter is not defined, then it publishes in the original order of the state interfaces |
christophfroehlich
left a comment
There was a problem hiding this comment.
Thanks for the follow-ups and the docs, just minor suggestions there
Co-authored-by: Christoph Fröhlich <christophfroehlich@users.noreply.github.com>
mhubii
left a comment
There was a problem hiding this comment.
Thank you for the effort and also considering URDF order!
I have tested this on mock hardware for lbr_fri_ros2_stack inside an Ubuntu 24.04 Docker container using option 1), 2), and 3).
ros2_control master branch source build.
- Option 1: ✅
- Option 2: ✅
- Option 3: ✅
However, this error occurred frequently:
[ros2_control_node-2] [ERROR] [1743008902.700347616] [lbr.controller_manager]: Caught exception of type : St18bad_variant_access while updating controller 'joint_state_broadcaster': std::get: wrong index for variantNot sure this is related.
I'm not sure if this has something to do with the joint_state_broadcaster. IMO for now, we can discard this |
(cherry picked from commit 364462a) # Conflicts: # joint_state_broadcaster/src/joint_state_broadcaster.cpp
I've add some fixes to the codes to retain the proper naming order. it will maintain the same naming as the state_interfaces. Most of the time. it is same as requested.
I confirm that it is working as expected. The following are the results after testing on the TIAGo robot
With
masterbranch:With the fix proposed in this PR: