gazebosim / ros_gz

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

Ensure the same container is used for the bridge and gz_server #553

Closed azeey closed 4 months ago

azeey commented 4 months ago

🦟 Bug fix

Part of #544

Summary

Using ComposableNodeContainer for both gz_server and ros_gz_bridge caused a new container to be created for each of them. This changes ros_gz_bridge to use LoadComposableNodes which uses an existing container, which would be created when launching gz_server. I've tested that this works even if ros_gz_bridge was launched first.

This also adds a required name parameter for the bridge so that multiple different bridges can be created without name collision

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.