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 ros_gz_sim.launch.py when create_own_container is enabled #620

Merged
merged 1 commit into from
Oct 17, 2024

Conversation

caguero
Copy link
Contributor

@caguero caguero commented Oct 17, 2024

🦟 Bug fix

I noticed that running the following example:

ros2 launch ros_gz_sim ros_gz_sim.launch.py world_sdf_file:=sensors_demo.sdf bridge_name:=ros_gz_bridge config_file:=/home/caguero/ros_gz_ws/src/ros_gz/ros_gz_bridge/test/config/full.yaml use_composition:=True create_own_container:=True

duplicates the number of running nodes and containers.

caguero@cold:~/ros_gz_ws$ ros2 node list
/gz_server
/gz_server
/launch_ros_1390503
/ros_gz_bridge
/ros_gz_bridge
/ros_gz_container
/ros_gz_container

After this patch:

caguero@cold:~/ros_gz_ws$ ros2 node list
/gz_server
/launch_ros_1395505
/ros_gz_bridge
/ros_gz_container

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.

Signed-off-by: Carlos Agüero <caguero@openrobotics.org>
@caguero caguero requested a review from ahcorde as a code owner October 17, 2024 19:33
@@ -92,20 +103,10 @@ def generate_launch_description():
('config_file', config_file),
('container_name', container_name),
('namespace', namespace),
('create_own_container', str(False)),
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is hardcoded, is this right ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's on purpose, to make sure that only one container is used.

@ahcorde ahcorde merged commit a4d00a9 into ros2 Oct 17, 2024
6 checks passed
@ahcorde ahcorde deleted the caguero/start_container_v2 branch October 17, 2024 21:39
@caguero
Copy link
Contributor Author

caguero commented Oct 17, 2024

https://github.com/Mergifyio backport jazzy

Copy link
Contributor

mergify bot commented Oct 17, 2024

backport jazzy

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Oct 17, 2024
Signed-off-by: Carlos Agüero <caguero@openrobotics.org>
(cherry picked from commit a4d00a9)
ahcorde pushed a commit that referenced this pull request Oct 18, 2024
…#621)

Signed-off-by: Carlos Agüero <caguero@openrobotics.org>
(cherry picked from commit a4d00a9)

Co-authored-by: Carlos Agüero <caguero@openrobotics.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants