gazebosim / ros_gz

Integration between ROS (1 and 2) and Gazebo simulation
https://gazebosim.org
Apache License 2.0
261 stars 139 forks source link

Fix ros_gz_sim.launch.py when create_own_container is enabled #620

Closed caguero closed 1 month ago

caguero commented 1 month ago

🦟 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

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 commented 1 month ago

https://github.com/Mergifyio backport jazzy

mergify[bot] commented 1 month ago

backport jazzy

✅ Backports have been created

* [#621 Fix ros_gz_sim.launch.py when create_own_container is enabled (backport #620)](https://github.com/gazebosim/ros_gz/pull/621) has been created for branch `jazzy`