Skip to content

Fix auto-added MoveIt controller parameters - #3825

Open
dlanov wants to merge 1 commit into
moveit:mainfrom
dlanov:fix-3796-auto-add-controller-fields
Open

Fix auto-added MoveIt controller parameters#3825
dlanov wants to merge 1 commit into
moveit:mainfrom
dlanov:fix-3796-auto-add-controller-fields

Conversation

@dlanov

@dlanov dlanov commented Aug 21, 2026

Copy link
Copy Markdown

Description

Fixes #3796.

Controllers::addDefaultControllers() previously used the three-argument addController() overload, which only populated the controller name, type, and joints. As a result, additional fields defined by MoveItControllers, including the required action_ns, were omitted from controllers created by the Setup Assistant's Auto Add path.

This change populates additional controller fields using getAdditionalControllerFields() and each field's getDefaultValue() before adding the controller. This keeps Auto Add behavior consistent with manual controller creation. Controller types without additional fields, such as ROS2Controllers, retain their existing behavior.

A regression test verifies that auto-added MoveIt controllers contain:

  • action_ns: follow_joint_trajectory
  • default: true

Testing

Validated against ROS 2 Jazzy with an isolated moveit_setup_controllers build:

  • colcon build --packages-select moveit_setup_controllers — passed
  • colcon test --packages-select moveit_setup_controllers — passed
  • 6/6 controller tests passed
  • ControllersTest.AddDefaultControllersMoveItAdditionalFields — passed
  • ControllersTest.AddDefaultControllers — passed
  • pre-commit — passed
  • clang-format-14 --dry-run --Werror — passed

Checklist

  • Required by CI: Code is auto formatted using clang-format
  • Extend the tutorials / documentation
  • Document API changes relevant to the user in MIGRATION.md
  • Create tests, which fail without this PR
  • Include a screenshot if changing a GUI

Summary by CodeRabbit

  • Bug Fixes

    • Default controllers now include all required configuration parameters, including action namespace and default values.
    • Controller setup consistently applies the configured controller type and parameters for each planning group.
  • Tests

    • Added regression coverage to verify default controllers are created correctly for every planning group.

Signed-off-by: Dennis Lanov <dennis.lanov@gmail.com>
@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 729dbdf3-cde7-4335-afb1-9ebaee7b99e4

📥 Commits

Reviewing files that changed from the base of the PR and between 8fcb5d2 and e2d6017.

📒 Files selected for processing (2)
  • moveit_setup_assistant/moveit_setup_controllers/src/controllers.cpp
  • moveit_setup_assistant/moveit_setup_controllers/test/test_controllers.cpp

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

addDefaultControllers() now creates complete controller configurations with default additional parameters. A regression test verifies one controller per planning group and checks the expected action namespace and default values.

Changes

Controller default parameter generation

Layer / File(s) Summary
Build complete default controllers
moveit_setup_assistant/moveit_setup_controllers/src/controllers.cpp
addDefaultControllers() now creates a ControllerInfo for each planning group and populates its additional parameters from their default values.
Validate generated controller configuration
moveit_setup_assistant/moveit_setup_controllers/test/test_controllers.cpp
The regression test verifies one FollowJointTrajectory controller per planning group and checks the action_ns and default parameters.

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

Merge Risk: ⚪ Minimal · up to e2d60

This localized change restores the missing default controller fields for the Auto Add path and includes passing regression coverage; no actionable merge-blocking risk remains beyond normal checks and review.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main fix to automatically added MoveIt controller parameters.
Linked Issues check ✅ Passed The changes populate default controller parameters, including action_ns and default, and add a regression test for issue #3796.
Out of Scope Changes check ✅ Passed The implementation and regression test are limited to fixing default controller parameter generation described in issue #3796.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@dlanov
dlanov marked this pull request as ready for review August 21, 2026 20:08
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.

Setup Assistant "Auto Add" controllers button omits required action_ns parameter

1 participant