Skip to content

panda_moveit_config, fanuc_moveit_config: correct the controller spawner and static TF arguments - #221

Merged
rhaschke merged 1 commit into
moveit:ros2from
nbbrooks:nbbrooks/controller-param-file-and-static-tf-args
Sep 10, 2026
Merged

rhaschke merged 1 commit into
moveit:ros2from
nbbrooks:nbbrooks/controller-param-file-and-static-tf-args

Conversation

@nbbrooks

@nbbrooks nbbrooks commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Description

The demo.launch.py files of panda_moveit_config and fanuc_moveit_config have two defects. This pull request corrects both defects. I found both defects on ROS 2 Lyrical, but the corrections apply to all distros.

Defect 1: the controllers do not start

The controller spawners do not receive a parameter file. The controller_manager node reads ros2_controllers.yaml, but the controller nodes do not read it. Each controller therefore starts with no parameters, and initialization fails:

[ros2_control_node-5] Exception thrown during init stage with message: Invalid value set during
initialization for parameter 'joints': Length of parameter 'joints' is '0' but must be greater than '0'
[ros2_control_node-5] [ERROR] [panda_arm_controller]: Calling shutdown transition of controller node
'panda_arm_controller' due to init failure.
[ros2_control_node-5] [ERROR] [controller_manager]: Could not initialize the controller named 'panda_arm_controller'
[ERROR] [spawner-7]: process has died [pid 756, exit code 1, cmd '.../spawner panda_arm_controller -c /controller_manager --ros-args'].

ros2 control list_controllers then shows no active controller. The user can plan a motion in RViz, but the user cannot run the motion. The Execute button has no action server to call.

The spawner program has a --param-file option. The option loads the parameter file into the controller node before configuration. This pull request gives the option to each spawner. Both launch files already hold the correct path in the ros2_controllers_path variable.

Defect 2: the static transform publisher stops

The static_transform_publisher node no longer accepts positional arguments. It requires --frame-id and --child-frame-id:

[static_transform_publisher-2] [ERROR] []: error parsing command line arguments: Frame id must not be empty
[ERROR] [static_transform_publisher-2]: process has died [pid 751, exit code 1, cmd
'.../static_transform_publisher 0.0 0.0 0.0 0.0 0.0 0.0 world panda_link0 --ros-args ...'].

The node stops, and no node publishes the world frame. This pull request changes the arguments to the named form. The publisher sends the identity transform if you give no translation and no rotation.

Changes

  • panda_moveit_config/launch/demo.launch.py
    • Give --param-file to the joint_state_broadcaster, panda_arm_controller and panda_hand_controller spawners.
    • Change the static transform arguments to --frame-id world --child-frame-id panda_link0.
  • fanuc_moveit_config/launch/demo.launch.py
    • Give --param-file to the joint_state_broadcaster and fanuc_controller spawners.
    • Change the static transform arguments to --frame-id world --child-frame-id base_link.

Compatibility

Both options are old enough for every distro in this repository's CI matrix:

  • controller_manager spawner has --param-file since Humble.
  • tf2_ros static_transform_publisher has --frame-id and --child-frame-id since Humble. Humble accepts the positional form, but it prints a deprecation warning.

The change is therefore safe for Humble, Jazzy, Kilted and Rolling/Resolute.

Testing

I tested panda_moveit_config on Ubuntu 26.04 (Resolute) with ROS 2 Lyrical binary packages. I installed MoveIt 2.15.0 from the build farm, and I replaced only this launch file.

Before the change:

joint_state_broadcaster  joint_state_broadcaster/JointStateBroadcaster  unconfigured

After the change:

panda_arm_controller     joint_trajectory_controller/JointTrajectoryController       active
joint_state_broadcaster  joint_state_broadcaster/JointStateBroadcaster               active
panda_hand_controller    parallel_gripper_action_controller/GripperActionController   active

The static_transform_publisher node stays alive, and tf2_echo world panda_link0 returns the identity transform. Both /panda_arm_controller/follow_joint_trajectory and /panda_hand_controller/gripper_cmd are available, so trajectory execution works again.

Checklist

  • The code is formatted with black (pre-commit passes).
  • The change needs no tutorial or documentation update.
  • The change needs no MIGRATION.md note.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Improved the FANUC and Panda demo launch configurations to correctly establish static transforms.
    • Controller spawners now consistently load the appropriate controller configuration during startup.
    • Improved reliability when launching joint state, arm, and hand controllers in the demo environments.

The demo.launch.py files of panda_moveit_config and fanuc_moveit_config
have two defects. This commit corrects both defects.

The controller spawners do not receive a parameter file. The
controller_manager node reads ros2_controllers.yaml, but the controller
nodes do not read it. Each controller therefore starts with no
parameters and fails to initialize. The user can plan a motion, but the
user cannot run it. The spawner program has a --param-file option that
loads the file into the controller node before configuration. This
commit adds the option to each spawner.

The static_transform_publisher node no longer accepts positional
arguments. It requires --frame-id and --child-frame-id. The node
therefore stops, and no node publishes the world frame. This commit
changes the arguments to the named form.

Both options exist since Humble. The change is safe for every distro in
CI.

Co-Authored-By: Claude Opus 5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Sep 9, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: c8852589-9bba-4e09-a0d3-e899b1840bbc

📥 Commits

Reviewing files that changed from the base of the PR and between c55b102 and 8ad1d36.

⛔ Files ignored due to path filters (2)
  • fanuc_moveit_config/launch/__pycache__/demo.launch.cpython-312.pyc is excluded by !**/*.pyc
  • panda_moveit_config/launch/__pycache__/demo.launch.cpython-312.pyc is excluded by !**/*.pyc
📒 Files selected for processing (2)
  • fanuc_moveit_config/launch/demo.launch.py
  • panda_moveit_config/launch/demo.launch.py

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

The Fanuc and Panda demo launch files now use named static transform arguments. Their controller spawners now receive the distro-specific ros2_controllers.yaml parameter file.

Changes

Launch configuration

Layer / File(s) Summary
Static transform arguments
fanuc_moveit_config/launch/demo.launch.py, panda_moveit_config/launch/demo.launch.py
Static TF publishers replace positional transform values with --frame-id and --child-frame-id arguments.
Controller parameter wiring
fanuc_moveit_config/launch/demo.launch.py, panda_moveit_config/launch/demo.launch.py
Controller spawners pass the distro-specific ros2_controllers.yaml path through --param-file.

Priority: ➖ Normal

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

Merge Risk: ⚪ Minimal · up to 8ad1d

The demo launches now provide controller parameters and publish the intended world-frame identity transforms, restoring controller activation and trajectory execution without an outstanding current-head risk.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 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 identifies both main changes: correcting controller spawner arguments and static TF arguments in the two affected packages.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

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

@rhaschke
rhaschke merged commit 11e8083 into moveit:ros2 Sep 10, 2026
10 checks passed
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.

2 participants