From c6f90bcb365d63286fa4fa05fea6e5fdb89c2f03 Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Thu, 2 Mar 2023 15:02:58 -0800 Subject: [PATCH] gzserver.launch.py: add initial_sim_time argument Expose gzserver CLI parameter added in gazebosim/gazebo-classic#3294. Signed-off-by: Steve Peters --- gazebo_ros/launch/gzserver.launch.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gazebo_ros/launch/gzserver.launch.py b/gazebo_ros/launch/gzserver.launch.py index bd7d15b8d..23f87cbb1 100644 --- a/gazebo_ros/launch/gzserver.launch.py +++ b/gazebo_ros/launch/gzserver.launch.py @@ -39,6 +39,9 @@ def generate_launch_description(): _boolean_command('lockstep'), _boolean_command('help'), _boolean_command('pause'), + # join with '=' (--initial_sim_time=[time]) so that old versions of + # gazebo will parse it all as a single argument and ignore the [time]. + _arg_command('initial_sim_time', join_with='='), _arg_command('physics'), _arg_command('play'), _boolean_command('record'), @@ -112,6 +115,10 @@ def generate_launch_description(): 'help', default_value='false', description='Set "true" to produce gzserver help message.' ), + DeclareLaunchArgument( + 'initial_sim_time', default_value='', + description='Specify the initial simulation time (seconds).' + ), DeclareLaunchArgument( 'pause', default_value='false', description='Set "true" to start the server in a paused state.'