Skip to content

Commit

Permalink
Revert "another failure trial, the spawner wants to spawn a controlle…
Browse files Browse the repository at this point in the history
…r named """

This reverts commit f922559.
  • Loading branch information
fmauch committed Oct 3, 2024
1 parent f922559 commit ea5f7bd
Showing 1 changed file with 23 additions and 8 deletions.
31 changes: 23 additions & 8 deletions ur_robot_driver/launch/ur_control.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def controller_spawner(controllers, condition, active=True):
controller_spawner_timeout,
]
+ inactive_flags
+ controllers,
+ [controllers],
condition=condition,
)

Expand All @@ -174,11 +174,26 @@ def controller_spawner(controllers, condition, active=True):
"forward_velocity_controller",
"forward_position_controller",
]
controllers_active_init = [*controllers_active_default, initial_joint_controller]
controllers_inactive_init = [
PythonExpression(["'", c, "' if '", c, "' != '", initial_joint_controller, "' else ''"])
for c in controllers_inactive_default
]
controllers_active_init = PythonExpression(
[
"'",
" ".join(controllers_active_default),
"' + ' ' +'",
initial_joint_controller,
"'",
]
)
controllers_inactive_init = PythonExpression(
[
"' '.join([c for c in ",
str(controllers_inactive_default),
"if c != '",
initial_joint_controller,
"'])",
]
)
print(controllers_active_init.perform(context))
print(controllers_inactive_init.perform(context))

controller_spawners = [
controller_spawner(
Expand All @@ -190,11 +205,11 @@ def controller_spawner(controllers, condition, active=True):
active=False,
),
controller_spawner(
controllers_active_default,
" ".join(controllers_active_default),
condition=UnlessCondition(activate_joint_controller),
),
controller_spawner(
controllers_inactive_default,
" ".join(controllers_inactive_default),
condition=UnlessCondition(activate_joint_controller),
active=False,
),
Expand Down

0 comments on commit ea5f7bd

Please sign in to comment.