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) #1696

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
Copy link
Contributor Author

mergify bot commented Aug 19, 2024

Cherry-pick of 0631e3e has failed:

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

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

@mergify mergify bot added the conflicts label Aug 19, 2024
saikishor and others added 2 commits August 31, 2024 23:06
* Fix conflicts

* added controller_type parameter setting to the spawner
Copy link

codecov bot commented Aug 31, 2024

Codecov Report

Attention: Patch coverage is 74.07407% with 14 lines in your changes missing coverage. Please review.

Project coverage is 62.22%. Comparing base (8534e6d) to head (dd0d8e5).
Report is 1 commits behind head on iron.

Files with missing lines Patch % Lines
.../controller_manager/controller_manager_services.py 76.47% 7 Missing and 5 partials ⚠️
controller_manager/controller_manager/spawner.py 33.33% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             iron    #1696      +/-   ##
==========================================
- Coverage   62.24%   62.22%   -0.02%     
==========================================
  Files         112      112              
  Lines       12297    12296       -1     
  Branches     8598     8602       +4     
==========================================
- Hits         7654     7651       -3     
+ Misses        879      878       -1     
- Partials     3764     3767       +3     
Flag Coverage Δ
unittests 62.22% <74.07%> (-0.02%) ⬇️

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 71.07% <33.33%> (-4.39%) ⬇️
.../controller_manager/controller_manager_services.py 70.68% <76.47%> (+4.53%) ⬆️

... and 1 file with indirect coverage changes

@christophfroehlich christophfroehlich merged commit 369ba8a into iron Oct 13, 2024
10 of 11 checks passed
@christophfroehlich christophfroehlich deleted the mergify/bp/iron/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