From e3e93e246718e172f8c34a11e609fa2cde8a6c01 Mon Sep 17 00:00:00 2001 From: sixfootsix50 Date: Sun, 18 Feb 2024 19:34:08 +0000 Subject: [PATCH] Changed group namespace --- .../launch/rocket_league_sim.launch.py | 39 +++++++++++-------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/src/rktl_launch/launch/rocket_league_sim.launch.py b/src/rktl_launch/launch/rocket_league_sim.launch.py index 20c82b45..f9096b04 100644 --- a/src/rktl_launch/launch/rocket_league_sim.launch.py +++ b/src/rktl_launch/launch/rocket_league_sim.launch.py @@ -28,28 +28,35 @@ def generate_launch_description(): name='autonomy_weights', default_value='model' ), - launch_ros.actions.SetRemap( - src="/cars/car0/odom", - dst="/cars/car0/odom_truth", - namespace="truth", - condition=launch.conditions.LaunchConfigurationEquals('sim_mode', 'realistic') - ), - launch_ros.actions.SetRemap( - src="/ball/odom", - dst="/ball/odom_truth", - namespace="truth", + launch.actions.GroupAction( + actions=[ + launch_ros.actions.PushRosNamespace("truth"), + launch_ros.actions.SetRemap( + src="/cars/car0/odom", + dst="/cars/car0/odom_truth", + ), + launch_ros.actions.SetRemap( + src="/ball/odom", + dst="/ball/odom_truth", + ), + launch.actions.GroupAction( + actions=[ + launch_ros.actions.PushRosNamespace("visualizer"), + launch_ros.actions.SetParameter( + name="window_name", + value="Ground Truth", + ) + ], + condition=launch.conditions.LaunchConfigurationEquals('sim_mode', 'realistic') + ) + + ], condition=launch.conditions.LaunchConfigurationEquals('sim_mode', 'realistic') ), launch_ros.actions.SetParametersFromFile( filename=os.path.join(get_package_share_directory( 'rktl_launch'), 'config', 'global_params.yaml') ), - launch_ros.actions.SetParameter( - name="window_name", - value="Ground Truth", - namespace="visualizer", - condition=launch.conditions.LaunchConfigurationEquals('sim_mode', 'realistic') - ), launch_ros.actions.Node( namespace='ball', package='rktl_control',