From a32617da642f46b5db66866c30a32dc60cd5f7d8 Mon Sep 17 00:00:00 2001 From: Seb Tiburzio Date: Thu, 15 Feb 2024 15:34:15 +0000 Subject: [PATCH 1/3] Re enable current controller Tested running on Pi and sending rostopic commands from PC --- dynamixel_hardware | 2 +- helix_bringup/launch/helix_bringup.launch.py | 38 ++++++++++++-------- helix_description/config/controllers.yaml | 28 +++++++-------- 3 files changed, 39 insertions(+), 29 deletions(-) diff --git a/dynamixel_hardware b/dynamixel_hardware index b0e7696..adb4faf 160000 --- a/dynamixel_hardware +++ b/dynamixel_hardware @@ -1 +1 @@ -Subproject commit b0e769624053ba459105a8d9c6f225b56cbac668 +Subproject commit adb4faf88e25099348e8a5968bb194de22ab00d3 diff --git a/helix_bringup/launch/helix_bringup.launch.py b/helix_bringup/launch/helix_bringup.launch.py index bf9f370..bbaea3c 100644 --- a/helix_bringup/launch/helix_bringup.launch.py +++ b/helix_bringup/launch/helix_bringup.launch.py @@ -6,6 +6,8 @@ from launch import LaunchDescription from launch_ros.actions import Node +# from launch.actions import RegisterEventHandler +# from launch.event_handlers import OnProcessExit def generate_launch_description(): @@ -53,6 +55,14 @@ def generate_launch_description(): output="screen", ) + # ros2_control 'controller' (broadcaster) for motor joint states + motor_head_joint_state_broadcaster_node = Node( + package="controller_manager", + executable="spawner", + arguments=["motor_head_joint_state_broadcaster", "--controller-manager", "/controller_manager"], + output="screen", + ) + # ros2_control controller for motor joint positions motor_head_joint_position_controller_node = Node( package="controller_manager", @@ -62,27 +72,27 @@ def generate_launch_description(): ) # ros2_control controller for motor joint efforts - # motor_head_helix_joint_effort_controller_node = Node( - # package="controller_manager", - # executable="spawner", - # arguments=["motor_head_joint_effort_controller", "--inactive", "-c", "/controller_manager"], - # output="screen", - # ) - - # ros2_control 'controller' (broadcaster) for motor joint states - motor_head_joint_state_broadcaster_node = Node( - package="controller_manager", - executable="spawner", - arguments=["motor_head_joint_state_broadcaster", "--controller-manager", "/controller_manager"], - output="screen", + motor_head_helix_joint_effort_controller_node = Node( + package="controller_manager", + executable="spawner", + arguments=["motor_head_joint_effort_controller", "--inactive", "-c", "/controller_manager"], + output="screen", ) + # # Delay start of motor_head_joint_position_controller_node after `motor_head_joint_state_broadcaster_node` + # delay_joint_controller_after_broadcaster = RegisterEventHandler( + # event_handler=OnProcessExit( + # target_action=motor_head_joint_state_broadcaster_node, + # on_exit=[motor_head_joint_position_controller_node], + # ) + # ) ld.add_action(robot_state_publisher) ld.add_action(joint_state_publisher_node) ld.add_action(helix_ros2_control_node) ld.add_action(motor_head_joint_position_controller_node) - # ld.add_action(motor_head_helix_joint_effort_controller_node) + ld.add_action(motor_head_helix_joint_effort_controller_node) ld.add_action(motor_head_joint_state_broadcaster_node) + # ld.add_action(delay_joint_controller_after_broadcaster) return ld \ No newline at end of file diff --git a/helix_description/config/controllers.yaml b/helix_description/config/controllers.yaml index c3e3ddb..8529c68 100644 --- a/helix_description/config/controllers.yaml +++ b/helix_description/config/controllers.yaml @@ -5,8 +5,8 @@ controller_manager: motor_head_joint_position_controller: type: position_controllers/JointGroupPositionController - # motor_head_joint_effort_controller: - # type: effort_controllers/JointGroupEffortController + motor_head_joint_effort_controller: + type: effort_controllers/JointGroupEffortController motor_head_joint_state_broadcaster: type: joint_state_broadcaster/JointStateBroadcaster @@ -24,18 +24,18 @@ motor_head_joint_position_controller: - joint7 - joint8 -# motor_head_joint_effort_controller: -# ros__parameters: -# joints: -# - joint0 -# - joint1 -# - joint2 -# - joint3 -# - joint4 -# - joint5 -# - joint6 -# - joint7 -# - joint8 +motor_head_joint_effort_controller: + ros__parameters: + joints: + - joint0 + - joint1 + - joint2 + - joint3 + - joint4 + - joint5 + - joint6 + - joint7 + - joint8 motor_head_joint_state_broadcaster: ros__parameters: From c4d1117610dd348c1f0a946ea2a1956740ce0e4e Mon Sep 17 00:00:00 2001 From: Seb Tiburzio Date: Thu, 15 Feb 2024 15:52:25 +0000 Subject: [PATCH 2/3] Re enable current interface in controller config (should have been included in prev commit) --- .../urdf/helix.ros2_control.xacro | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/helix_description/urdf/helix.ros2_control.xacro b/helix_description/urdf/helix.ros2_control.xacro index c02b85d..6675834 100644 --- a/helix_description/urdf/helix.ros2_control.xacro +++ b/helix_description/urdf/helix.ros2_control.xacro @@ -15,7 +15,7 @@ 0 - + @@ -23,7 +23,7 @@ 1 - + @@ -31,7 +31,7 @@ 2 - + @@ -39,7 +39,7 @@ 3 - + @@ -47,7 +47,7 @@ 4 - + @@ -55,7 +55,7 @@ 5 - + @@ -63,7 +63,7 @@ 6 - + @@ -71,7 +71,7 @@ 7 - + @@ -79,7 +79,7 @@ 8 - + From c9d13f09c0efce37e8545093b28151e316ee4cb1 Mon Sep 17 00:00:00 2001 From: Seb Tiburzio Date: Thu, 15 Feb 2024 17:39:16 +0100 Subject: [PATCH 3/3] Update submodule --- dynamixel_hardware | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dynamixel_hardware b/dynamixel_hardware index adb4faf..590e5b1 160000 --- a/dynamixel_hardware +++ b/dynamixel_hardware @@ -1 +1 @@ -Subproject commit adb4faf88e25099348e8a5968bb194de22ab00d3 +Subproject commit 590e5b114f66a76cb4a7cf5d3437da693c05d8c3