From 65ae646d9870662d4358d627df8c670f2873b2a7 Mon Sep 17 00:00:00 2001 From: Felix Exner Date: Tue, 14 May 2024 10:51:32 +0200 Subject: [PATCH] Add an if-condition to RViz delay This prevents RViz from spawning twice if the moveit startup is used. --- ur_simulation_gz/launch/ur_sim_control.launch.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ur_simulation_gz/launch/ur_sim_control.launch.py b/ur_simulation_gz/launch/ur_sim_control.launch.py index 47ff73d..b94c2b2 100644 --- a/ur_simulation_gz/launch/ur_sim_control.launch.py +++ b/ur_simulation_gz/launch/ur_sim_control.launch.py @@ -128,7 +128,8 @@ def launch_setup(context, *args, **kwargs): event_handler=OnProcessExit( target_action=joint_state_broadcaster_spawner, on_exit=[rviz_node], - ) + ), + condition=IfCondition(launch_rviz), ) # There may be other controllers of the joints, but this is the initially-started one