Skip to content

Commit

Permalink
Add confg
Browse files Browse the repository at this point in the history
Signed-off-by: Arjo Chakravarty <[email protected]>
  • Loading branch information
arjo129 authored Jan 24, 2025
1 parent 278c27f commit 9431af1
Showing 1 changed file with 24 additions and 11 deletions.
35 changes: 24 additions & 11 deletions ros_gz_sim/launch/gz_sim.launch.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ def launch_gz(context, *args, **kwargs):
ign_version = LaunchConfiguration('ign_version').perform(context)
debugger = LaunchConfiguration('debugger').perform(context)
on_exit_shutdown = LaunchConfiguration('on_exit_shutdown').perform(context)
debug_env = LaunchConfiguration('debug_env').perform(context)

if not len(gz_args) and len(ign_args):
print("ign_args is deprecated, migrate to gz_args!")
Expand All @@ -127,17 +128,29 @@ def launch_gz(context, *args, **kwargs):
else:
on_exit = None

return [
LogInfo(f"Launching gazebo with the environment variables: {env}"),
ExecuteProcess(
cmd=[exec, exec_args, '--force-version', gz_version],
name='gazebo',
output='screen',
additional_env=env,
shell=True,
prefix=debug_prefix,
on_exit=on_exit
)]
if debug_env == 'true':
return [
LogInfo(f"Launching gazebo with the environment variables: {env}"),
ExecuteProcess(
cmd=[exec, exec_args, '--force-version', gz_version],
name='gazebo',
output='screen',
additional_env=env,
shell=True,
prefix=debug_prefix,
on_exit=on_exit
)]
else:
return [
ExecuteProcess(
cmd=[exec, exec_args, '--force-version', gz_version],
name='gazebo',
output='screen',
additional_env=env,
shell=True,
prefix=debug_prefix,
on_exit=on_exit
)]


def generate_launch_description():
Expand Down

0 comments on commit 9431af1

Please sign in to comment.