Skip to content

Commit

Permalink
Use contoller config in moveit fake hardware launch only if defined (#63
Browse files Browse the repository at this point in the history
)

* contoller config used only if defined

* format

---------

Co-authored-by: Aron Svastits <svastits1@gmail.com>
  • Loading branch information
Svastits and Aron Svastits authored Sep 2, 2024
1 parent 179a59c commit 2b0a7c8
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions kuka_resources/launch/fake_hardware_planning_template.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
]

Expand Down

0 comments on commit 2b0a7c8

Please sign in to comment.