Skip to content

Commit

Permalink
dynamically update use_sim_time, depending on backend
Browse files Browse the repository at this point in the history
Fixes #438
  • Loading branch information
whoenig committed Feb 24, 2024
1 parent 261f3e8 commit 4bbe8ce
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 4bbe8ce

Please sign in to comment.