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

Extra parameter to start a container #616

Merged
merged 10 commits into from
Oct 14, 2024
Merged

Extra parameter to start a container #616

merged 10 commits into from
Oct 14, 2024

Conversation

caguero
Copy link
Contributor

@caguero caguero commented Sep 27, 2024

🦟 Bug fix

Leaving it as a draft to discuss what people think. The idea behind this extra parameter is to provide more flexibility. We'd have three options:

  1. use_composition:=False . Run as an external ROS node.
  2. use_composition:=True and create_own_container. Load as a composable node within its own ROS container.
  3. use_composition:=True and not create_own_container. Load as a composable node but delegate to the user to specify the ROS container with the container_name parameter.

Summary

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸

🎉 New feature

Closes #

Summary

Test it

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸

➡️ Forward port

Port <FROM_BRANCH> to <TO_BRANCH>

Branch comparison: https://github.com/gazebosim//compare/<TO_BRANCH>...<FROM_BRANCH>

Note to maintainers: Remember to Merge with commit (not squash-merge or rebase)

🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸

🎈 Release

Preparation for <X.Y.Z> release.

Comparison to <x.y.z>: https://github.com/gazebosim//compare/<LATEST_TAG_BRANCH>...<RELEASE_BRANCH>

Needed by <PR(s)>

Checklist

  • Asked team if this is a good time for a release
  • There are no changes to be ported from the previous major version
  • No PRs targeted at this major version are close to getting in
  • Bumped minor for new features, patch for bug fixes
  • Updated changelog
  • Updated migration guide (as needed)
  • Link to PR updating dependency versions in appropriate repository in gazebo-release (as needed):

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

@caguero caguero marked this pull request as draft September 27, 2024 15:48
Copy link
Contributor

@azeey azeey left a comment

Choose a reason for hiding this comment

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

I think we should also make use_composition=False the default. The scenario I'd like to prevent is that the Gazebo server is started using gz sim -s (I.e, not using the GzServer launch action) and the bridge is started using the RosGzBridge action. Since the default now is use_composition=True, it will try to add itself into an existing container, but due to the way Gazebo was started, that container will not be available.

@@ -46,6 +47,12 @@ def generate_launch_description():
description='Name of container that nodes will load in if use composition',
)

declare_start_container_cmd = DeclareLaunchArgument(
'start_container',
Copy link
Contributor

Choose a reason for hiding this comment

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

I would suggest changing this to create_own_container to make it a little more clear that this is not necessary for the bridge to work as a composable node. I would also add more to the description so users don't think they have to set this to True in order to get the benefits of composition.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I renamed the new parameter as suggested and added to the launch action. I also changed the default value of use_composition to False. f0f63b3

Signed-off-by: Carlos Agüero <[email protected]>
caguero and others added 4 commits October 3, 2024 17:53
Signed-off-by: Carlos Agüero <[email protected]>
Signed-off-by: Carlos Agüero <[email protected]>
Co-authored-by: Addisu Z. Taddese <[email protected]>
Signed-off-by: Carlos Agüero <[email protected]>
Signed-off-by: Carlos Agüero <[email protected]>
@caguero caguero marked this pull request as ready for review October 3, 2024 16:59
@azeey
Copy link
Contributor

azeey commented Oct 3, 2024

Should we do the same for the gz_server launch file? Right now, it's not possible to put the GzServer node in a container created by the consumer.

@caguero
Copy link
Contributor Author

caguero commented Oct 3, 2024

Should we do the same for the gz_server launch file? Right now, it's not possible to put the GzServer node in a container created by the consumer.

I think so.

What do you think about the default value for use_composition in the gz_server launch? In some way it's more of an end-application, which makes me think a value of True isn't as problematic here. But at the same time having a consistency set of launch files (defaulting use_composition to False like in the bridge) makes it easier to use.

@azeey
Copy link
Contributor

azeey commented Oct 3, 2024

I don't have a strong opinion, but I lean toward making use_composition=False for both launch files by default. It feels safer at this point.

@caguero
Copy link
Contributor Author

caguero commented Oct 10, 2024

I don't have a strong opinion, but I lean toward making use_composition=False for both launch files by default. It feels safer at this point.

Thanks, changed to use_composition:=False and create_own_container:=False by default.

@ahcorde
Copy link
Collaborator

ahcorde commented Oct 14, 2024

@ros-pull-request-builder retest this please

@ahcorde ahcorde merged commit 8115cca into ros2 Oct 14, 2024
5 checks passed
@ahcorde ahcorde deleted the caguero/start_container branch October 14, 2024 13:59
@caguero
Copy link
Contributor Author

caguero commented Oct 15, 2024

https://github.com/Mergifyio backport jazzy

Copy link
Contributor

mergify bot commented Oct 15, 2024

backport jazzy

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Oct 15, 2024
Signed-off-by: Carlos Agüero <[email protected]>
(cherry picked from commit 8115cca)
ahcorde pushed a commit that referenced this pull request Oct 15, 2024
Signed-off-by: Carlos Agüero <[email protected]>
(cherry picked from commit 8115cca)

Co-authored-by: Carlos Agüero <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants