ros_gz
ros_gz copied to clipboard
Launch file for combined gzserver + bridge
🎉 New feature
Summary
This patch lets you combine the functionality from #530 and #532 into a single launch file.
How to test it?
Use the provided ros_gz_sim.launch.py
(modify config_file
accordingly) to run the bridge as an executable
ros2 launch ros_gz_sim ros_gz_sim.launch.py world_sdf_file:=empty.sdf config_file:=/home/caguero/ros_gz_ws/src/ros_gz/ros_gz_bridge/test/config/full.yaml
You should see messages of gzserver loading. Additionally, verify that you see the /ros_chatter
topic:
caguero@cold:~/ros_gz_ws$ ros2 topic list
/parameter_events
/ros_chatter
/rosout
Confirm that no container has been created:
caguero@cold:~/ros_gz_ws$ ros2 component list
Now CTRL-C
to stop all nodes and try the composable version:
ros2 launch ros_gz_sim ros_gz_sim.launch.py world_sdf_file:=empty.sdf use_composition:=True config_file:=/home/caguero/ros_gz_ws/src/ros_gz/ros_gz_bridge/test/config/full.yaml
gzserver should be running. Verify that you also see the /ros_chatter
topic:
caguero@cold:~/ros_gz_ws$ ros2 topic list
/parameter_events
/ros_chatter
/rosout
And confirm that a container has been created with both nodes:
caguero@cold:~/ros_gz_ws$ ros2 component list
/ros_gz_container
1 /ros_gz_bridge
2 /gzserver
Test it
Checklist
- [x] Signed all commits for DCO
- [ ] Added tests
- [ ] Added example and/or tutorial
- [ ] 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.