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

Launch gzserver from xml #548

Closed caguero closed 4 months ago

caguero commented 4 months ago

🎉 New feature

Part of https://github.com/gazebosim/ros_gz/issues/552

Summary

This patch allows to run gzserver (as an executable or as a composable node) from an xml file.

How to test it?

Use the provided gzserver.launch to run gzserver as an executable:

ros2 launch ros_gz_sim gz_server.launch world_sdf_file:=empty.sdf

Confirm that you see gzserver loading and verify that no container has been created:

caguero@cold:~/ros_gz_ws$ ros2 component list

Now CTRL-C gzserver and try the composable version:

ros2 launch ros_gz_sim gzserver.launch world_sdf_file:=empty.sdf use_composition:=True

Confirm that you see gzserver loading and verify that a new container has been created:

caguero@cold:~/ros_gz_ws$ ros2 component list
/ros_gz_container
  1  /gzserver

Test it

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 4 months ago

@mjcarroll , is this the idea that you had in mind with gzserver.launch?