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

Open
wants to merge 3 commits into
base: humble
Choose a base branch
from

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.

Please upload report for BASE (humble@4659d58). Learn more about missing BASE report.

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.27%           
=========================================
  Files             ?      105           
  Lines             ?    11314           
  Branches          ?     7933           
=========================================
  Hits              ?     7046           
  Misses            ?      806           
  Partials          ?     3462           
Flag Coverage Δ
unittests 62.27% <77.77%> (?)

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 68.25% <33.33%> (ø)
.../controller_manager/controller_manager_services.py 72.41% <80.39%> (ø)

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