Skip to content

Commit c20cc01

Browse files
committed
using controller configuratio from the repo
1 parent 3c863d6 commit c20cc01

File tree

1 file changed

+20
-17
lines changed

1 file changed

+20
-17
lines changed

kuka_control/launch/hardware.launch.py

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ def node_ros2_control(
2828
PathJoinSubstitution(
2929
[
3030
FindPackageShare(
31-
LaunchConfiguration("ctrl_cfg_pkg", default="lbr_description")
31+
LaunchConfiguration("ctrl_cfg_pkg", default="kuka_control")
3232
),
3333
LaunchConfiguration(
34-
"ctrl_cfg", default="ros2_control/lbr_controllers.yaml"
34+
"ctrl_cfg", default="config/controllers.yaml"
3535
),
3636
]
3737
),
@@ -62,7 +62,6 @@ def launch_setup(context, *args, **kwargs):
6262
):
6363
sys_cfg_default = "config/lbr_system_config_torque.yaml"
6464

65-
print(f"Uwsing system config: {sys_cfg_default}")
6665
# Declare sys_cfg argument now that we know the correct default
6766
sys_cfg_arg = DeclareLaunchArgument(
6867
"sys_cfg",
@@ -101,23 +100,27 @@ def launch_setup(context, *args, **kwargs):
101100
LaunchConfiguration("ctrl")
102101
)
103102

104-
controller_event_handler = RegisterEventHandler(
105-
OnProcessStart(
106-
target_action=ros2_control_node,
107-
on_start=[
108-
joint_state_broadcaster,
109-
force_torque_broadcaster,
110-
lbr_state_broadcaster,
111-
controller,
112-
],
113-
)
114-
)
103+
# controller_event_handler = RegisterEventHandler(
104+
# OnProcessStart(
105+
# target_action=ros2_control_node,
106+
# on_start=[
107+
# joint_state_broadcaster,
108+
# force_torque_broadcaster,
109+
# lbr_state_broadcaster,
110+
# controller,
111+
# ],
112+
# )
113+
# )
115114

116115
return [
117116
sys_cfg_arg,
118117
robot_state_publisher,
119118
ros2_control_node,
120-
controller_event_handler,
119+
# controller_event_handler,
120+
joint_state_broadcaster,
121+
force_torque_broadcaster,
122+
lbr_state_broadcaster,
123+
controller,
121124
]
122125

123126

@@ -149,6 +152,6 @@ def generate_launch_description() -> LaunchDescription:
149152
)
150153

151154
# Opaque function to evaluate 'ctrl' and configure dependent args/nodes
152-
ld.add_action(OpaqueFunction(function=launch_setup))
153-
155+
op = OpaqueFunction(function=launch_setup)
156+
ld.add_action(op)
154157
return ld

0 commit comments

Comments
 (0)