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

Refactor spawner to be able to reuse code for ros2controlcli (backport #1661) #1695

Merged
merged 4 commits into from
Oct 13, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Aug 19, 2024

@christophfroehlich has mentioned that ros2 control CLI is missing the functionality to load controllers with the parameter files as we have now with the spawner. upon reviewing the code, the code would need some refactoring to reduce some duplication of code in both places and to be able also to load controllers with namespaced controller manager

This PR would be the first part of refactoring that can go along with #1562, once both the PRs are done, the ros2 control CLI can be modified to add the parameter parsing from the file and proper usage with namespacing.


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

(cherry picked from commit 0631e3e)

# Conflicts:
#	controller_manager/controller_manager/spawner.py
#	controller_manager/test/test_spawner_unspawner.cpp
@mergify mergify bot added the conflicts label Aug 19, 2024
Copy link
Contributor Author

mergify bot commented Aug 19, 2024

Cherry-pick of 0631e3e has failed:

On branch mergify/bp/humble/pr-1661
Your branch is up to date with 'origin/humble'.

You are currently cherry-picking commit 0631e3e.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   controller_manager/controller_manager/__init__.py
	modified:   controller_manager/controller_manager/controller_manager_services.py
	modified:   controller_manager/controller_manager/hardware_spawner.py
	modified:   ros2controlcli/ros2controlcli/verb/list_controllers.py
	modified:   ros2controlcli/ros2controlcli/verb/list_hardware_components.py
	modified:   ros2controlcli/ros2controlcli/verb/list_hardware_interfaces.py

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   controller_manager/controller_manager/spawner.py
	both modified:   controller_manager/test/test_spawner_unspawner.cpp

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

* Fix conflicts

* added controller_type parameter setting to the spawner
Copy link

codecov bot commented Aug 31, 2024

Codecov Report

Attention: Patch coverage is 77.77778% with 12 lines in your changes missing coverage. Please review.

Project coverage is 62.36%. Comparing base (4ed2ee0) to head (6b0c46e).
Report is 1 commits behind head on humble.

Files with missing lines Patch % Lines
.../controller_manager/controller_manager_services.py 80.39% 5 Missing and 5 partials ⚠️
controller_manager/controller_manager/spawner.py 33.33% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           humble    #1695      +/-   ##
==========================================
- Coverage   62.38%   62.36%   -0.03%     
==========================================
  Files         108      108              
  Lines       11406    11405       -1     
  Branches     7975     7979       +4     
==========================================
- Hits         7116     7113       -3     
+ Misses        816      815       -1     
- Partials     3474     3477       +3     
Flag Coverage Δ
unittests 62.36% <77.77%> (-0.03%) ⬇️

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

Files with missing lines Coverage Δ
controller_manager/controller_manager/__init__.py 100.00% <ø> (ø)
...ler_manager/controller_manager/hardware_spawner.py 0.00% <ø> (ø)
controller_manager/controller_manager/spawner.py 69.04% <33.33%> (-4.77%) ⬇️
.../controller_manager/controller_manager_services.py 72.41% <80.39%> (+6.25%) ⬆️

... and 1 file with indirect coverage changes

@christophfroehlich christophfroehlich merged commit cd55739 into humble Oct 13, 2024
10 of 11 checks passed
@christophfroehlich christophfroehlich deleted the mergify/bp/humble/pr-1661 branch October 13, 2024 11:25
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