-
Notifications
You must be signed in to change notification settings - Fork 774
ROS 2 Migration: Launch Scripts
The functionalities of gazebo_ros
scripts in ROS1 (gazebo
, gzclient
, gzserver
, debug
, gdbrun
, perf
, libcommon.sh
) are being offered by launch scripts gazebo.launch.py
, gzserver.launch.py
and gzclient.launch.py
in ROS2.
rosrun gazebo_ros gazebo
ros2 launch gazebo_ros gazebo.launch.py
rosrun gazebo_ros gzserver
ros2 launch gazebo_ros gzserver.launch.py
rosrun gazebo_ros gzclient
ros2 launch gazebo_ros gzclient.launch.py
rosrun gazebo_ros debug
ros2 launch gazebo_ros gzserver.launch.py gdb:=true
In ROS2, gzclient
script also supports gdb
ros2 launch gazebo_ros gzclient.launch.py gdb:=true
or
ros2 launch gazebo_ros gazebo.launch.py gdb:=true
rosrun gazebo_ros perf
ros2 launch gazebo_ros gzserver.launch.py valgrind:=true
Similar to gdb, valgrind can also be run with gazebo
and gzserver
For all other arguments to be passed to gazebo
, gzclient
or gzserver
command, launch_arguments
are available in the respective scripts.
ros2 launch gazebo_ros gazebo.launch.py world:=actor.world verbose:=true
By default, the system plugins are loaded in gzserver. To load without them
ros2 launch gazebo_ros gazebo.launch.py init:=false factory:=false
By default, both gzserver
and gzclient
have to be terminated for the launch script to exit. server_required
and gui_required
tell the launch script to shut down automatically if either one of gzserver
or gzclient
has terminated, respectively:
ros2 launch gazebo_ros gazebo.launch.py gui_required:=true server_required:=true
extra_gazebo_args
is a special argument which allows any gazebo argument to be passed as it is passed to the usual gazebo
command
ros2 launch gazebo_ros gazebo.launch.py extra_gazebo_args:="--verbose --pause"