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 file for running gzserver #532

Closed caguero closed 5 months ago

caguero commented 5 months ago

🎉 New feature

Summary

This patch allows to run gzserver as an executable or as a composable node.

How to test it?

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

ros2 launch ros_gz_sim gz_server.launch.py 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 gz_server.launch.py 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.