Skip to content

[Spawner] Allow arguments per controller instead of global args (backport #2895)#3053

Open
mergify[bot] wants to merge 1 commit intokiltedfrom
mergify/bp/kilted/pr-2895
Open

[Spawner] Allow arguments per controller instead of global args (backport #2895)#3053
mergify[bot] wants to merge 1 commit intokiltedfrom
mergify/bp/kilted/pr-2895

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Feb 26, 2026

This PR adds some changes to the Spawner to allow it to define the controller args per controller rather than global args for all the controllers.

I've added a new function in the launch_utils and I tested it using the following changes in example_12
https://github.com/ros-controls/ros2_control_demos/blob/advanced_spawner/example_12/bringup/launch/rrbot.launch.py

With this change we can do both the following

ros2 run controller_manager spawner ctrl_1 ctrl_2 --inactive --controller-ros-args ....

and

ros2 run controller_manager spawner --controller ctrl_1 --load-only --controller ctrl_2 --inactive --controller-ros-args ...


This is an automatic backport of pull request #2895 done by Mergify.

@codecov
Copy link

codecov bot commented Feb 26, 2026

Codecov Report

❌ Patch coverage is 82.01439% with 75 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.25%. Comparing base (94a432f) to head (ed23a38).
⚠️ Report is 2 commits behind head on kilted.

Files with missing lines Patch % Lines
...troller_manager/controller_manager/launch_utils.py 2.56% 38 Missing ⚠️
controller_manager/controller_manager/spawner.py 78.70% 15 Missing and 8 partials ⚠️
controller_manager/test/test_advanced_spawner.cpp 94.81% 0 Missing and 14 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           kilted    #3053      +/-   ##
==========================================
- Coverage   89.36%   89.25%   -0.12%     
==========================================
  Files         157      158       +1     
  Lines       18792    19170     +378     
  Branches     1510     1549      +39     
==========================================
+ Hits        16794    17110     +316     
- Misses       1377     1424      +47     
- Partials      621      636      +15     
Flag Coverage Δ
unittests 89.25% <82.01%> (-0.12%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
controller_manager/test/test_advanced_spawner.cpp 94.81% <94.81%> (ø)
controller_manager/controller_manager/spawner.py 72.76% <78.70%> (+2.35%) ⬆️
...troller_manager/controller_manager/launch_utils.py 22.97% <2.56%> (-22.75%) ⬇️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@christophfroehlich
Copy link
Member

#3054

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants