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

Open
wants to merge 2 commits into
base: iron
Choose a base branch
from

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.

* 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 <denis@stoglrobotics.de>
Co-authored-by: Bence Magyar <bence.magyar.robotics@gmail.com>
Co-authored-by: Christoph Fröhlich <christophfroehlich@users.noreply.github.com>
(cherry picked from commit 5dbd6d5)

# Conflicts:
#	controller_manager/CMakeLists.txt
Copy link
Contributor Author

mergify bot commented Oct 31, 2024

Cherry-pick of 5dbd6d5 has failed:

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

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

@mergify mergify bot added the conflicts label Oct 31, 2024
@bmagyar bmagyar removed the conflicts label Oct 31, 2024
@christophfroehlich
Copy link
Contributor

@fmauch could you maybe have a look why the test fail on humble?

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