Skip to content

Commit

Permalink
add launch argument to record gazebo state log (#300)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaybrecht committed Jan 30, 2024
1 parent ca96842 commit 87badc5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ariac_gazebo/launch/ariac.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def launch_setup(context, *args, **kwargs):
trial_config_path = os.path.join(pkg_share, 'config', 'trials', trial_name + ".yaml")

dev_mode = LaunchConfiguration("dev_mode")
record_state = LaunchConfiguration("record_state")

if not os.path.exists(trial_config_path):
rclpy.logging.get_logger('Launch File').fatal(
Expand Down Expand Up @@ -84,6 +85,7 @@ def launch_setup(context, *args, **kwargs):
),
launch_arguments={
'world': world_path,
'record': record_state,
}.items()
)

Expand Down Expand Up @@ -206,4 +208,9 @@ def generate_launch_description():
DeclareLaunchArgument("dev_mode", default_value="false", description="run simulation in dev mode")
)

declared_arguments.append(
DeclareLaunchArgument("record_state", default_value="false", description="record a gazebo state.log")
)


return LaunchDescription(declared_arguments + [OpaqueFunction(function=launch_setup)])

0 comments on commit 87badc5

Please sign in to comment.