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

[Dashing backport]: Fix race with launch context changes when loading composable nodes (#… #238

Merged
merged 1 commit into from
May 20, 2021

Conversation

clalancette
Copy link
Contributor

…166)

  • Fix race with launch context changes when loading composable nodes

This bug was discovered when trying load composable nodes from a GroupAction.
The ROS namespace (and presumably other remaps) pushed onto the context stack
was popped after the LoadComposableNodes execute() function finished.
But because the loading happens asynchronously, we need to make sure we get the
necessary information from the context before execute() finishes.

Signed-off-by: Jacob Perron jacob@openrobotics.org

  • Add regression tests for LoadComposableNode

Signed-off-by: Jacob Perron jacob@openrobotics.org

  • Properly shutdown mock conatiner node

Also added some debug logs to the load node action for posterity.

Backporting note: As far as I can tell, the Composable launch_ros classes in
Dashing are not setup to be able to be tested. We would need to add a bunch
of additional dependencies to write tests here. I didn't think
that was worth it for Dashing, so I just removed the tests.

Signed-off-by: Jacob Perron jacob@openrobotics.org
Signed-off-by: Chris Lalancette clalancette@openrobotics.org

)

* Fix race with launch context changes when loading composable nodes

This bug was discovered when trying load composable nodes from a GroupAction.
The ROS namespace (and presumably other remaps) pushed onto the context stack
was popped after the LoadComposableNodes execute() function finished.
But because the loading happens asynchronously, we need to make sure we get the
necessary information from the context before execute() finishes.

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Add regression tests for LoadComposableNode

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Properly shutdown mock conatiner node

Also added some debug logs to the load node action for posterity.

Backporting note: As far as I can tell, the *Composable* launch_ros classes in
Dashing are not setup to be able to be tested.  We would need to add a bunch
of additional dependencies to write tests here.  I didn't think
that was worth it for Dashing, so I just removed the tests.

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
Copy link
Contributor

@hidmic hidmic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM pending green Dashing CI

@clalancette
Copy link
Contributor Author

CI (--packages-above launch_ros):

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@clalancette
Copy link
Contributor Author

Looking at the CI output, the flake8/pep257 errors are pre-existing, and not because of this PR. But I'd like confirmation from @nuclearsandwich before merging.

@nuclearsandwich
Copy link
Member

Looking at the CI output, the flake8/pep257 errors are pre-existing, and not because of this PR. But I'd like confirmation from @nuclearsandwich before merging.

Yeah, those linters weren't labeled correctly in Dashing so they show even with linters disabled.

@clalancette clalancette merged commit 4de5934 into dashing May 20, 2021
@delete-merged-branch delete-merged-branch bot deleted the backport-166 branch May 20, 2021 14:34
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.

4 participants