From df8401df7be3047e36e8442d60566472d8c6bf44 Mon Sep 17 00:00:00 2001 From: Sebastian Jahr Date: Thu, 21 Dec 2023 10:13:00 +0100 Subject: [PATCH] Update ros2 control usage (#192) (#193) * Update ros2_control usage * Update dual_arm_panda_moveit_config/config/panda_hand.ros2_control.xacro Co-authored-by: Sebastian Castro <4603398+sea-bass@users.noreply.github.com> --------- Co-authored-by: Sebastian Castro <4603398+sea-bass@users.noreply.github.com> # Conflicts: # dual_arm_panda_moveit_config/config/panda.ros2_control.xacro # dual_arm_panda_moveit_config/config/panda_hand.ros2_control.xacro # dual_arm_panda_moveit_config/launch/demo.launch.py --- .../config/fanuc.ros2_control.xacro | 24 ++++++++++++---- fanuc_moveit_config/launch/demo.launch.py | 5 +++- .../config/panda.ros2_control.xacro | 28 ++++++++++++++----- .../config/panda_hand.ros2_control.xacro | 8 ++++-- panda_moveit_config/launch/demo.launch.py | 5 +++- 5 files changed, 53 insertions(+), 17 deletions(-) diff --git a/fanuc_moveit_config/config/fanuc.ros2_control.xacro b/fanuc_moveit_config/config/fanuc.ros2_control.xacro index 607f9199..e79fb2e6 100644 --- a/fanuc_moveit_config/config/fanuc.ros2_control.xacro +++ b/fanuc_moveit_config/config/fanuc.ros2_control.xacro @@ -13,42 +13,54 @@ ${initial_positions['joint_1']} - + + 0.0 + ${initial_positions['joint_2']} - + + 0.0 + ${initial_positions['joint_3']} - + + 0.0 + ${initial_positions['joint_4']} - + + 0.0 + ${initial_positions['joint_5']} - + + 0.0 + ${initial_positions['joint_6']} - + + 0.0 + diff --git a/fanuc_moveit_config/launch/demo.launch.py b/fanuc_moveit_config/launch/demo.launch.py index 6becbcdf..80ec9541 100644 --- a/fanuc_moveit_config/launch/demo.launch.py +++ b/fanuc_moveit_config/launch/demo.launch.py @@ -79,7 +79,10 @@ def generate_launch_description(): ros2_control_node = Node( package="controller_manager", executable="ros2_control_node", - parameters=[moveit_config.robot_description, ros2_controllers_path], + parameters=[ros2_controllers_path], + remappings=[ + ("/controller_manager/robot_description", "/robot_description"), + ], output="both", ) diff --git a/panda_moveit_config/config/panda.ros2_control.xacro b/panda_moveit_config/config/panda.ros2_control.xacro index addc3384..d66294c9 100644 --- a/panda_moveit_config/config/panda.ros2_control.xacro +++ b/panda_moveit_config/config/panda.ros2_control.xacro @@ -20,49 +20,63 @@ ${initial_positions['panda_joint1']} - + + 0.0 + ${initial_positions['panda_joint2']} - + + 0.0 + ${initial_positions['panda_joint3']} - + + 0.0 + ${initial_positions['panda_joint4']} - + + 0.0 + ${initial_positions['panda_joint5']} - + + 0.0 + ${initial_positions['panda_joint6']} - + + 0.0 + ${initial_positions['panda_joint7']} - + + 0.0 + diff --git a/panda_moveit_config/config/panda_hand.ros2_control.xacro b/panda_moveit_config/config/panda_hand.ros2_control.xacro index 06d4d177..9adc4f6c 100644 --- a/panda_moveit_config/config/panda_hand.ros2_control.xacro +++ b/panda_moveit_config/config/panda_hand.ros2_control.xacro @@ -18,7 +18,9 @@ 0.0 - + + 0.0 + panda_finger_joint1 @@ -27,7 +29,9 @@ 0.0 - + + 0.0 + diff --git a/panda_moveit_config/launch/demo.launch.py b/panda_moveit_config/launch/demo.launch.py index bdbc12cf..9e7cf8e3 100644 --- a/panda_moveit_config/launch/demo.launch.py +++ b/panda_moveit_config/launch/demo.launch.py @@ -116,7 +116,10 @@ def generate_launch_description(): ros2_control_node = Node( package="controller_manager", executable="ros2_control_node", - parameters=[moveit_config.robot_description, ros2_controllers_path], + parameters=[ros2_controllers_path], + remappings=[ + ("/controller_manager/robot_description", "/robot_description"), + ], output="screen", )