Fix: preserve planar joint suffix in Ros2ControlManager (Fixes #3594)#3601
Open
saumanraaj wants to merge 2 commits intomoveit:mainfrom
Open
Fix: preserve planar joint suffix in Ros2ControlManager (Fixes #3594)#3601saumanraaj wants to merge 2 commits intomoveit:mainfrom
saumanraaj wants to merge 2 commits intomoveit:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes incorrect parsing of claimed interfaces in
moveit_ros_control_interface::Ros2ControlManager.Problem:
Planar (and other multi-DOF) joints expose variable names with an extra segment (e.g.,
base_joint/x/position,base_joint/y/position,base_joint/theta/position). The current helper:splits at the first
/, turningbase_joint/x/positionintobase_joint, which drops the/x(or/y,/theta) component. As a result,Ros2ControlManagerfails to find the appropriate controller, even when it exists.Fix:
Change the parsing to strip only the final interface segment (e.g.,
/position,/velocity,/effort) and preserve intermediate suffixes for multi-DOF joints:This makes:
joint1/position→joint1(unchanged behavior for single-DOF)base_joint/x/position→base_joint/xbase_joint/theta/velocity→base_joint/thetaRelated issue: Fixes #3594.
Why safe:
The change is localized, backward-compatible for single-DOF joints, and aligns with MoveIt’s planar joint variable naming (
name/x,name/y,name/theta).Manual check (optional):
Using the Mobile Base + Arm tutorial (with
moveit_ros_control_interface/Ros2ControlManager), controllers advertisingbase_joint/{x,y,theta}/positionare now correctly matched.Checklist
(ran
ament_clang_format/ verified formatting)N/A for this targeted fix, but happy to add a note if desired.
No API change; behavior fix only.
If maintainers want, I can add small parser unit tests:
"joint1/position" → "joint1""base_joint/x/position" → "base_joint/x""base_joint/theta/velocity" → "base_joint/theta"N/A
Notes for reviewers