|
38 | 38 | from launch import LaunchDescription |
39 | 39 | from launch.actions import DeclareLaunchArgument, OpaqueFunction |
40 | 40 | from launch.conditions import IfCondition |
41 | | -from launch.substitutions import Command, FindExecutable, LaunchConfiguration, PathJoinSubstitution |
| 41 | +from launch.substitutions import ( |
| 42 | + Command, |
| 43 | + FindExecutable, |
| 44 | + LaunchConfiguration, |
| 45 | + PathJoinSubstitution, |
| 46 | + OrSubstitution, |
| 47 | +) |
42 | 48 |
|
43 | 49 |
|
44 | 50 | def launch_setup(context, *args, **kwargs): |
@@ -167,7 +173,9 @@ def launch_setup(context, *args, **kwargs): |
167 | 173 | # Trajectory Execution Configuration |
168 | 174 | controllers_yaml = load_yaml("ur_moveit_config", "config/controllers.yaml") |
169 | 175 | # the scaled_joint_trajectory_controller does not work on fake hardware |
170 | | - change_controllers = context.perform_substitution(use_fake_hardware) |
| 176 | + change_controllers = context.perform_substitution( |
| 177 | + OrSubstitution(use_fake_hardware, use_sim_time) |
| 178 | + ) |
171 | 179 | if change_controllers == "true": |
172 | 180 | controllers_yaml["scaled_joint_trajectory_controller"]["default"] = False |
173 | 181 | controllers_yaml["joint_trajectory_controller"]["default"] = True |
@@ -235,6 +243,9 @@ def launch_setup(context, *args, **kwargs): |
235 | 243 | robot_description_kinematics, |
236 | 244 | robot_description_planning, |
237 | 245 | warehouse_ros_config, |
| 246 | + { |
| 247 | + "use_sim_time": use_sim_time, |
| 248 | + }, |
238 | 249 | ], |
239 | 250 | ) |
240 | 251 |
|
|
0 commit comments