Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the namespaced controller_manager spawner + added tests #1640

Merged
merged 13 commits into from
Jul 29, 2024

Conversation

saikishor
Copy link
Member

This PR aims to fix the spawner to work with namespace controller manager and added tests for this particular case. It is started from #1547, however after looking into the spawner, it seems like the --namespace parameter is no longer required as you could pass it in the arg --controller-manager as how it is done for the unspawner, if this is fine, then we can get rid of the --namespace arg

closes: #1547
fixes: #1506

Copy link

codecov bot commented Jul 25, 2024

Codecov Report

Attention: Patch coverage is 98.64865% with 1 line in your changes missing coverage. Please review.

Project coverage is 88.04%. Comparing base (872029c) to head (bb81928).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1640      +/-   ##
==========================================
+ Coverage   87.95%   88.04%   +0.08%     
==========================================
  Files         108      108              
  Lines        9913     9985      +72     
  Branches      889      891       +2     
==========================================
+ Hits         8719     8791      +72     
+ Misses        875      874       -1     
- Partials      319      320       +1     
Flag Coverage Δ
unittests 88.04% <98.64%> (+0.08%) ⬆️

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

Files Coverage Δ
...er_manager/test/controller_manager_test_common.hpp 89.83% <100.00%> (ø)
controller_manager/test/test_spawner_unspawner.cpp 98.97% <98.63%> (-0.21%) ⬇️

... and 1 file with indirect coverage changes

Copy link
Contributor

@christophfroehlich christophfroehlich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested with ros-controls/ros2_control_demos#502 but I still failed.

Copy link
Member

@bmagyar bmagyar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds like a good idea but let's deprecate the namespace parameter first, loudly

@saikishor
Copy link
Member Author

Sounds like a good idea but let's deprecate the namespace parameter first, loudly

Make sense. You are right. I shouldn't have removed it abruptly hahHa 😅😅

@saikishor saikishor force-pushed the fix/namespaced/cm_spawner branch from 4fe868f to 49498c3 Compare July 27, 2024 11:55
@saikishor
Copy link
Member Author

@bmagyar I've added the --namespace arg is now added as deprecated and I've also added tests for the deprecated arg

@christophfroehlich I've made some changes on ros-controls/ros2_control_demos#502 for the new namespacing and also the missing --param-file arg. Check and let me know

Copy link
Contributor

@christophfroehlich christophfroehlich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested now successfully with 1ac5e13 of ros-controls/ros2_control_demos#502.

May I ask for updating the docs, and adding migration notes?

@saikishor
Copy link
Member Author

May I ask for updating the docs, and adding migration notes?

Sire, I can update the docs.

Copy link
Contributor

@christophfroehlich christophfroehlich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks :)

bmagyar
bmagyar previously approved these changes Jul 29, 2024
@bmagyar bmagyar merged commit 5cd1a43 into ros-controls:master Jul 29, 2024
20 of 21 checks passed
christophfroehlich added a commit that referenced this pull request Aug 12, 2024
* [ResourceManager] Make destructor virtual for use in derived classes (#1607)

* Fix typos in test_resource_manager.cpp (#1609)

* [CM] Remove support for the description parameter and use only `robot_description` topic (#1358)

---------

Co-authored-by: Felix Exner <[email protected]>
Co-authored-by: Christoph Froehlich <[email protected]>

* move critical variables to the private context (#1623)

* Fix controller starting with later load of robot description test (#1624)

* Fix the duplicated restart of the controller_manager services initialization

* Scope the ControllerManagerRunner to avoid malloc and other test issues

* reorder the tests for consistent log at the end

* Remove noqa (#1626)

* Unused header cleanup (#1627)

* Create debugging.rst (#1625)


---------

Co-authored-by: Sai Kishor Kothakota <[email protected]>
Co-authored-by: Christoph Froehlich <[email protected]>

* Update changelogs

* 4.14.0

* add missing rclcpp logging include for Humble compatibility build (#1635)

* [CM] Remove deprecated spawner args (#1639)

* Add a pytest launch file to test ros2_control_node (#1636)

* Fix rst markup (#1642)

* Fix rqt_cm paragraph

* Fix indent

* CM: Add missing includes (#1641)

* [RM] Add `get_hardware_info` method to the Hardware Components (#1643)

* Fix the namespaced controller_manager spawner + added tests (#1640)

* Bump version of pre-commit hooks (#1649)

Co-authored-by: christophfroehlich <[email protected]>

* Add missing include for executors (#1653)

* Update changelogs

* 4.15.0

* refactor SwitchParams to fix the incosistencies in the spawner tests (#1638)

* Modify test with missing CM to have a timeout

* Catch exception when CM services are not found

And print the error and exit in the application

* Exit with code 1 on unreached CM

---------

Co-authored-by: Sai Kishor Kothakota <[email protected]>
Co-authored-by: Parker Drouillard <[email protected]>
Co-authored-by: Dr. Denis <[email protected]>
Co-authored-by: Christoph Froehlich <[email protected]>
Co-authored-by: Christoph Fröhlich <[email protected]>
Co-authored-by: Henry Moore <[email protected]>
Co-authored-by: Lennart Nachtigall <[email protected]>
Co-authored-by: Sai Kishor Kothakota <[email protected]>
Co-authored-by: Bence Magyar <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: christophfroehlich <[email protected]>
@saikishor saikishor deleted the fix/namespaced/cm_spawner branch August 17, 2024 08:19
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.

spawner.py parse parameters with namespace wrong
4 participants