You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixes#4019. Use saved Xacro mappings only when the caller passes None, preserving an explicitly supplied empty dictionary.
Checklist
Formatting and pre-commit checks
Regression tests for omitted, empty and nonempty mappings
Tutorials, migration and GUI screenshots (not applicable)
Review another open PR
Validation: the empty-mapping regression fails before the fix; all 6 targeted Python tests pass afterward. Full ROS integration remains pending CI.
Summary by CodeRabbit
Bug Fixes
Robot descriptions now use mappings saved by the setup assistant when no mappings are specified. Explicitly providing an empty mapping preserves the Xacro defaults, while providing mappings continues to override them.
Added coverage for omitted, empty, and explicitly supplied mappings to verify the resulting robot description.
No actionable comments were generated in the recent review.
Walkthrough
MoveItConfigsBuilder.robot_description now uses saved mappings only when mappings is None. An empty mapping is passed through, allowing Xacro defaults to apply. A parametrized test checks omitted, empty, and explicit mappings.
Changes: Xacro Mapping Selection
Layer / File(s)
Summary
Mapping selection and validation moveit_configs_utils/moveit_configs_utils/moveit_configs_builder.py, moveit_configs_utils/test/test_empty_xacro_mappings.py
The builder documentation and logic distinguish None from an explicit empty mapping. The test checks the resulting link name for omitted, empty, and explicit mappings.
robot_description() now honors an explicitly empty mappings dictionary and uses saved setup-assistant mappings only when mappings are omitted. The change is small and covered by a targeted test. Merge readiness is good, subject to CI passing.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title "Honor explicitly empty Xacro mappings" matches the main change. The builder now passes saved URDF mappings only when mappings is None, so an explicitly supplied empty mapping is preserved. …
Linked Issues check
Issue #4019 requires that only mappings=None use the saved .setup_assistant Xacro mappings, and that an explicitly supplied dictionary, including {}, be honored. At the reviewed head, moveit_configs_b…
Out of Scope Changes check
The whole-PR diff against the merge base 5399d29 changes two files. moveit_configs_builder.py contains the one-expression behavior fix and a docstring clarification for the mappings parameter. test_em…
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Full details: Title check
Explanation
The title "Honor explicitly empty Xacro mappings" matches the main change. The builder now passes saved URDF mappings only when mappings is None, so an explicitly supplied empty mapping is preserved. The PR objectives and linked issue #4019 describe the same behavior. The title is short, specific, and states the primary behavior change.
Full details: Linked Issues check
Explanation
Issue #4019 requires that only mappings=None use the saved .setup_assistant Xacro mappings, and that an explicitly supplied dictionary, including {}, be honored. At the reviewed head, moveit_configs_builder.py line 237 passes self.__urdf_xacro_args if mappings is None else mappings to load_xacro. The previous mappings or self.__urdf_xacro_args expression, which replaced {} with the saved mappings, is removed. The added docstring line states that None selects the saved mappings. The new test test_empty_xacro_mappings.py parametrizes None (expects saved value 'saved'), {} (expects Xacro default 'default'), and a nonempty dictionary (expects 'explicit'). This covers the reproduction in the issue. The test was not executed in this review. Its result rests on the author's report and the source diff.
Full details: Out of Scope Changes check
Explanation
The whole-PR diff against the merge base 5399d29 changes two files. moveit_configs_builder.py contains the one-expression behavior fix and a docstring clarification for the mappings parameter. test_empty_xacro_mappings.py is a new regression test for the same behavior. Both changes connect directly to issue #4019. No unrelated changes are present.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 0 remain after this review.
Tick the box to add this pull request to the merge queue (same as @mergifyio queue). If it does not match the queue conditions yet, it enters the queue once it does.
Queue this pull request once it meets the queue conditions
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
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
Fixes #4019. Use saved Xacro mappings only when the caller passes None, preserving an explicitly supplied empty dictionary.
Checklist
Validation: the empty-mapping regression fails before the fix; all 6 targeted Python tests pass afterward. Full ROS integration remains pending CI.
Summary by CodeRabbit