Skip to content

Merge Pilz Cartesian limits under the configured namespace - #4013

Open
sylvesterkaczmarek wants to merge 1 commit into
moveit:mainfrom
sylvesterkaczmarek:fix/pilz-cartesian-limits-namespace
Open

sylvesterkaczmarek wants to merge 1 commit into
moveit:mainfrom
sylvesterkaczmarek:fix/pilz-cartesian-limits-namespace

Conversation

@sylvesterkaczmarek

@sylvesterkaczmarek sylvesterkaczmarek commented Nov 29, 2026 •

Copy link
Copy Markdown

Description

Fixes #4011. Merge Pilz Cartesian limits under the configured planning namespace without mutating the original joint limits.

Checklist

  • Formatting and repository pre-commit checks
  • Regression tests (default/custom namespaces and Cartesian-only configuration)
  • Tutorial, migration or GUI changes (not applicable)
  • Review another open PR

Validation: all 3 new regression cases fail before the fix; 6 targeted Python tests pass afterward. Full ROS integration is pending CI.

Summary by CodeRabbit

  • Bug Fixes
    • Pilz Cartesian limits are now included in their matching parameter namespace, alongside existing joint limits when present.
    • Cartesian limits are also preserved when no joint limits are configured.

@coderabbitai

coderabbitai Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

MoveItConfigs.to_dict() now merges Pilz Cartesian limits into matching parameter namespaces. Tests cover default and custom namespaces, preservation of joint limits, and configurations with only Cartesian limits.

Changes: Pilz Cartesian limits

Layer / File(s) Summary
Namespace merge and validation
moveit_configs_utils/moveit_configs_utils/moveit_configs_builder.py, moveit_configs_utils/test/test_pilz_cartesian_limits.py
to_dict() merges each Cartesian-limits dictionary into its matching namespace. Tests check default and custom planning namespaces, confirm joint_limits remains unchanged, and cover Cartesian-only input.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Medium

Possibly related issues

  • moveit/moveit2#4012: This change avoids in-place updates for the limit dictionaries handled here. It does not address the separate ParameterBuilder dictionary leak described in the issue.

Suggested reviewers: abishalini, stephanie-eng, rhaschke

Merge Risk: Minimal · up to 46e0e

This change merges Pilz Cartesian limits into their configured namespace without altering the stored joint limits. No actionable merge-blocking risk was found, and the targeted tests cover the new behavior.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "Merge Pilz Cartesian limits under the configured namespace" matches the main change. MoveItConfigs.to_dict() now merges pilz_cartesian_limits into each matching parameter namespace instead …
Linked Issues check Passed [#4011] The requirement is that MoveItConfigs.to_dict() merges pilz_cartesian_limits under each configured namespace, works with custom namespaces, leaves the original configuration unchanged, and…
Out of Scope Changes check Passed The whole-PR diff against the merge base changes two files. moveit_configs_utils/moveit_configs_utils/moveit_configs_builder.py changes only the to_dict() Cartesian-limits merge, with +3/-5 lines.…
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Full details: Title check

Explanation

The title "Merge Pilz Cartesian limits under the configured namespace" matches the main change. MoveItConfigs.to_dict() now merges pilz_cartesian_limits into each matching parameter namespace instead of hard-coding robot_description_planning, which is the core objective of PR #4013 and linked issue #4011. The title is short, specific, and free of noise.

Full details: Linked Issues check

Explanation

[#4011] The requirement is that MoveItConfigs.to_dict() merges pilz_cartesian_limits under each configured namespace, works with custom namespaces, leaves the original configuration unchanged, and does not raise KeyError for Cartesian-only configurations. At head, to_dict() replaces the hard-coded robot_description_planning access with a loop over self.pilz_cartesian_limits.items(). Each namespace key comes from the input, so custom namespaces work. The line parameters[namespace] = {**parameters.get(namespace, {}), **limits} builds a new dict. It does not write into self.joint_limits[namespace], so the stored joint limits stay unchanged. parameters.get(namespace, {}) avoids KeyError when no joint limits exist. The added tests cover default and custom namespaces and the Cartesian-only case. The head file was read, and the code path was checked by reading. The tests were not executed in this review. The PR description reports 6 targeted Python tests passing. Full ROS integration is pending CI and was not assessed.

Full details: Out of Scope Changes check

Explanation

The whole-PR diff against the merge base changes two files. moveit_configs_utils/moveit_configs_utils/moveit_configs_builder.py changes only the to_dict() Cartesian-limits merge, with +3/-5 lines. moveit_configs_utils/test/test_pilz_cartesian_limits.py adds regression tests for the same behavior. Both changes support the objective in #4011. No unrelated change was found.

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.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 5399d29 and 46e0e96.

Files selected for processing: 2

  • moveit_configs_utils/moveit_configs_utils/moveit_configs_builder.py
  • moveit_configs_utils/test/test_pilz_cartesian_limits.py

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 4 remain after this review.

@mergify

mergify Bot commented Nov 29, 2026

Copy link
Copy Markdown

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pilz Cartesian limits merge fails with custom robot description namespace

1 participant