From 2b0a7c8ad8b7854ea687949546c3b0af9b642adb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81ron=20Svastits?= <49677296+Svastits@users.noreply.github.com> Date: Mon, 2 Sep 2024 09:50:44 +0200 Subject: [PATCH] Use contoller config in moveit fake hardware launch only if defined (#63) * contoller config used only if defined * format --------- Co-authored-by: Aron Svastits --- .../fake_hardware_planning_template.launch.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/kuka_resources/launch/fake_hardware_planning_template.launch.py b/kuka_resources/launch/fake_hardware_planning_template.launch.py index 562dca1..05e159a 100644 --- a/kuka_resources/launch/fake_hardware_planning_template.launch.py +++ b/kuka_resources/launch/fake_hardware_planning_template.launch.py @@ -91,17 +91,14 @@ def launch_setup(context, *args, **kwargs): # Spawn controllers def controller_spawner(controller_with_config): - arg_list = [ - controller_with_config[0], - "-c", - controller_manager_node, - "-p", - controller_with_config[1], - ] + arg_list = [controller_with_config[0], "-c", controller_manager_node] + if controller_with_config[1] is not None: + arg_list.append("-p") + arg_list.append(controller_with_config[1]) return Node(package="controller_manager", executable="spawner", arguments=arg_list) controller_names_and_config = [ - ("joint_state_broadcaster", []), + ("joint_state_broadcaster", None), ("joint_trajectory_controller", controller_config), ]