Skip to content

Commit

Permalink
Merge pull request #439 from IMRCLab/issue438
Browse files Browse the repository at this point in the history
dynamically update use_sim_time, depending on backend
  • Loading branch information
knmcguire authored Feb 27, 2024
2 parents e818576 + 4bbe8ce commit 6019132
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crazyflie/launch/launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def generate_launch_description():
name='rviz2',
arguments=['-d' + os.path.join(get_package_share_directory('crazyflie'), 'config', 'config.rviz')],
parameters=[{
"use_sim_time": True,
"use_sim_time": PythonExpression(["'", LaunchConfiguration('backend'), "' == 'sim'"]),
}]
),
Node(
Expand All @@ -143,5 +143,8 @@ def generate_launch_description():
namespace='',
executable='gui.py',
name='gui',
parameters=[{
"use_sim_time": PythonExpression(["'", LaunchConfiguration('backend'), "' == 'sim'"]),
}]
),
])

0 comments on commit 6019132

Please sign in to comment.