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 Hardware spawner and add tests for it (backport #1759) #1827

Merged
merged 8 commits into from
Nov 10, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Oct 31, 2024

This basically implements my comments from #1682 (review)

I discussed with @destogl that I would create a new PR including his commit from #1682. So, this effectively replaces #1682.

It basically changes the following things:

  • Actually makes the hardware spawner work. I think it never worked correctly the way it was structured before. (is_hardware_component_loaded checks for one single string, while activate_components and configure_components expect a list.)
  • Fully implement that the hardware spawner allows specifying a list of components that should be started. This is cmdline-interface-breaking (basically only on a parameter description level) change but since it never worked I would expect nobody has been using it so far, so we can safely backport it.
  • Add tests for hardware_spawner (mainly implemented by @destogl)
    This is an automatic backport of pull request Fix Hardware spawner and add tests for it #1759 done by Mergify.

@mergify mergify bot added the conflicts label Oct 31, 2024
Copy link
Contributor Author

mergify bot commented Oct 31, 2024

Cherry-pick of 5dbd6d5 has failed:

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

You are currently cherry-picking commit 5dbd6d5.
  (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/hardware_spawner.py
	modified:   controller_manager/doc/userdoc.rst
	new file:   controller_manager/test/test_hardware_spawner.cpp

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   controller_manager/CMakeLists.txt

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

fmauch and others added 4 commits November 9, 2024 09:00
* Tests for hardware spawner.

* Fully support spawning a list of hardware components

* Use python3 coverage instead of ros2 run in tests

* Actually check component's state after changing it

* Update hardware_spawner's user documentation

---------

Co-authored-by: Dr. Denis Štogl <[email protected]>
Co-authored-by: Bence Magyar <[email protected]>
Co-authored-by: Christoph Fröhlich <[email protected]>
(cherry picked from commit 5dbd6d5)

# Conflicts:
#	controller_manager/CMakeLists.txt
Copy link

codecov bot commented Nov 10, 2024

Codecov Report

Attention: Patch coverage is 77.53623% with 31 lines in your changes missing coverage. Please review.

Project coverage is 63.15%. Comparing base (0cb0716) to head (465bb9e).
Report is 1 commits behind head on humble.

Files with missing lines Patch % Lines
controller_manager/test/test_hardware_spawner.cpp 78.81% 7 Missing and 18 partials ⚠️
...ler_manager/controller_manager/hardware_spawner.py 70.00% 4 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           humble    #1827      +/-   ##
==========================================
+ Coverage   62.47%   63.15%   +0.67%     
==========================================
  Files         108      109       +1     
  Lines       12169    12286     +117     
  Branches     8257     8310      +53     
==========================================
+ Hits         7603     7759     +156     
+ Misses        884      822      -62     
- Partials     3682     3705      +23     
Flag Coverage Δ
unittests 63.15% <77.53%> (+0.67%) ⬆️

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

Files with missing lines Coverage Δ
...ler_manager/controller_manager/hardware_spawner.py 70.23% <70.00%> (+70.23%) ⬆️
controller_manager/test/test_hardware_spawner.cpp 78.81% <78.81%> (ø)

... and 2 files 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.

Thx @saikishor for fixing

@christophfroehlich christophfroehlich merged commit dcb958f into humble Nov 10, 2024
8 of 12 checks passed
@christophfroehlich christophfroehlich deleted the mergify/bp/humble/pr-1759 branch November 10, 2024 17:04
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.

3 participants