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

Robustify spawner (backport #1501) #1687

Merged
merged 3 commits into from
Aug 16, 2024
Merged

Robustify spawner (backport #1501) #1687

merged 3 commits into from
Aug 16, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Aug 16, 2024

With the current implementation it can happen that when using multiple controller spawners some of them fail or get stuck, see #1182. This fixes #1182 and #1483.

While writing this, I realize this has great overlap with #1483, but I see no problem combining those two.

As briefly mentioned above, this change addresses two things:

  • The node discovery mechanism for the controller manager seems to be error-prone and not strictly needed.
  • It can happen that we don't get a response from the service server and hang in a deadlock.

Note: The test I implemented is a bit hacky, so we might also want to remove it again? Otherwise I think we would have to change the following things:

  • I installed the test folder in order to access the controller configuration file living in there. We should either install that file by hand rather than the complete test folder or move it somewhere else.
  • I've added a urdf file in ros_control_test_assets as I thought that might be the most useful place. I might be wrong.
  • I've added a sleep to my test before checking whether the controller_manager shows up all the expected controllers. That worked for me for an implementation, but since a timeout is very error-prone it would be better to have a proper waiting mechanism. With the changes I made the spawners should die eventually and not hang in a deadlock, so we could add event handlers to the launch description, but I'm not sure how to combine the exit events from all the spawners into one trigger.

I implemented and tested things on the rolling on jammy installation I currently have, but I know the problem definitively also arises for humble users.


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

…ollers (#1501)

---------

Co-authored-by: Dr. Denis <denis@stoglrobotics.de>
(cherry picked from commit 80c264f)

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

mergify bot commented Aug 16, 2024

Cherry-pick of 80c264f has failed:

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

You are currently cherry-picking commit 80c264f.
  (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/controller_manager_services.py

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	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

destogl
destogl previously approved these changes Aug 16, 2024
controller_manager/test/test_spawner_unspawner.cpp Outdated Show resolved Hide resolved
controller_manager/test/test_spawner_unspawner.cpp Outdated Show resolved Hide resolved
destogl
destogl previously approved these changes Aug 16, 2024
controller_manager/test/test_spawner_unspawner.cpp Outdated Show resolved Hide resolved
Copy link

codecov bot commented Aug 16, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 4 lines in your changes missing coverage. Please review.

Project coverage is 62.09%. Comparing base (41723d2) to head (aae3fb1).
Report is 1 commits behind head on iron.

Files Patch % Lines
controller_manager/test/test_spawner_unspawner.cpp 75.00% 0 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             iron    #1687      +/-   ##
==========================================
+ Coverage   62.08%   62.09%   +0.01%     
==========================================
  Files         102      102              
  Lines       11775    11791      +16     
  Branches     8447     8461      +14     
==========================================
+ Hits         7310     7322      +12     
+ Misses        747      745       -2     
- Partials     3718     3724       +6     
Flag Coverage Δ
unittests 62.09% <75.00%> (+0.01%) ⬆️

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

Files Coverage Δ
controller_manager/test/test_spawner_unspawner.cpp 57.32% <75.00%> (+0.94%) ⬆️

... and 1 file with indirect coverage changes

@destogl destogl merged commit bd5683a into iron Aug 16, 2024
10 of 11 checks passed
@destogl destogl deleted the mergify/bp/iron/pr-1501 branch August 16, 2024 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants