From ba305767cbdf35b6b19945b5b8b94474e24d3532 Mon Sep 17 00:00:00 2001 From: Sai Kishor Kothakota Date: Thu, 17 Oct 2024 13:31:05 +0200 Subject: [PATCH] Added generic rrbot configuration file to use with controller spawning (#599) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * added generic rrbot configuration file to use with controller spawning * Test with changes * Update ros2_control_demos-not-released.rolling.repos --------- Co-authored-by: Christoph Fröhlich --- ...ontroller_manager_rrbot_2_controllers.yaml | 39 ------------------- ...er_manager_rrbot_generic_controllers.yaml} | 25 ++++++++++-- ...oller_manager_example_two_rrbots.launch.py | 8 ++-- example_15/doc/userdoc.rst | 3 +- 4 files changed, 26 insertions(+), 49 deletions(-) delete mode 100644 example_15/bringup/config/multi_controller_manager_rrbot_2_controllers.yaml rename example_15/bringup/config/{multi_controller_manager_rrbot_1_controllers.yaml => multi_controller_manager_rrbot_generic_controllers.yaml} (72%) diff --git a/example_15/bringup/config/multi_controller_manager_rrbot_2_controllers.yaml b/example_15/bringup/config/multi_controller_manager_rrbot_2_controllers.yaml deleted file mode 100644 index 9738c6ae2..000000000 --- a/example_15/bringup/config/multi_controller_manager_rrbot_2_controllers.yaml +++ /dev/null @@ -1,39 +0,0 @@ -/rrbot_2/controller_manager: - ros__parameters: - update_rate: 10 # Hz - - joint_state_broadcaster: - type: joint_state_broadcaster/JointStateBroadcaster - - -/rrbot_2/forward_position_controller: - ros__parameters: - type: forward_command_controller/ForwardCommandController - joints: - - rrbot_2_joint1 - - rrbot_2_joint2 - interface_name: position - - -/rrbot_2/position_trajectory_controller: - ros__parameters: - type: joint_trajectory_controller/JointTrajectoryController - joints: - - rrbot_2_joint1 - - rrbot_2_joint2 - - command_interfaces: - - position - - state_interfaces: - - position - - state_publish_rate: 200.0 # Defaults to 50 - action_monitor_rate: 20.0 # Defaults to 20 - - allow_partial_joints_goal: false # Defaults to false - open_loop_control: true - allow_integration_in_goal_trajectories: true - constraints: - stopped_velocity_tolerance: 0.01 # Defaults to 0.01 - goal_time: 0.0 # Defaults to 0.0 (start immediately) diff --git a/example_15/bringup/config/multi_controller_manager_rrbot_1_controllers.yaml b/example_15/bringup/config/multi_controller_manager_rrbot_generic_controllers.yaml similarity index 72% rename from example_15/bringup/config/multi_controller_manager_rrbot_1_controllers.yaml rename to example_15/bringup/config/multi_controller_manager_rrbot_generic_controllers.yaml index 973035d93..a30c82162 100644 --- a/example_15/bringup/config/multi_controller_manager_rrbot_1_controllers.yaml +++ b/example_15/bringup/config/multi_controller_manager_rrbot_generic_controllers.yaml @@ -1,4 +1,4 @@ -/rrbot_1/controller_manager: +/**/controller_manager: ros__parameters: update_rate: 10 # Hz @@ -6,22 +6,39 @@ type: joint_state_broadcaster/JointStateBroadcaster -/rrbot_1/forward_position_controller: +/**/forward_position_controller: ros__parameters: type: forward_command_controller/ForwardCommandController + interface_name: position + +/rrbot_1/forward_position_controller: + ros__parameters: joints: - rrbot_1_joint1 - rrbot_1_joint2 - interface_name: position +/rrbot_2/forward_position_controller: + ros__parameters: + joints: + - rrbot_2_joint1 + - rrbot_2_joint2 /rrbot_1/position_trajectory_controller: ros__parameters: - type: joint_trajectory_controller/JointTrajectoryController joints: - rrbot_1_joint1 - rrbot_1_joint2 +/rrbot_2/position_trajectory_controller: + ros__parameters: + joints: + - rrbot_2_joint1 + - rrbot_2_joint2 + +/**/position_trajectory_controller: + ros__parameters: + type: joint_trajectory_controller/JointTrajectoryController + command_interfaces: - position diff --git a/example_15/bringup/launch/multi_controller_manager_example_two_rrbots.launch.py b/example_15/bringup/launch/multi_controller_manager_example_two_rrbots.launch.py index 7e5b99cc2..82c26ca24 100644 --- a/example_15/bringup/launch/multi_controller_manager_example_two_rrbots.launch.py +++ b/example_15/bringup/launch/multi_controller_manager_example_two_rrbots.launch.py @@ -76,7 +76,7 @@ def generate_launch_description(): "description_package": "ros2_control_demo_example_1", "description_file": "rrbot.urdf.xacro", "runtime_config_package": "ros2_control_demo_example_15", - "controllers_file": "multi_controller_manager_rrbot_1_controllers.yaml", + "controllers_file": "multi_controller_manager_rrbot_generic_controllers.yaml", "prefix": "rrbot_1_", "use_mock_hardware": use_mock_hardware, "mock_sensor_commands": mock_sensor_commands, @@ -99,7 +99,7 @@ def generate_launch_description(): [ FindPackageShare("ros2_control_demo_example_15"), "config", - "multi_controller_manager_rrbot_1_controllers.yaml", + "multi_controller_manager_rrbot_generic_controllers.yaml", ] ), ], @@ -112,7 +112,7 @@ def generate_launch_description(): "description_package": "ros2_control_demo_example_5", "description_file": "rrbot_system_with_external_sensor.urdf.xacro", "runtime_config_package": "ros2_control_demo_example_15", - "controllers_file": "multi_controller_manager_rrbot_2_controllers.yaml", + "controllers_file": "multi_controller_manager_rrbot_generic_controllers.yaml", "prefix": "rrbot_2_", "use_mock_hardware": use_mock_hardware, "mock_sensor_commands": mock_sensor_commands, @@ -135,7 +135,7 @@ def generate_launch_description(): [ FindPackageShare("ros2_control_demo_example_15"), "config", - "multi_controller_manager_rrbot_2_controllers.yaml", + "multi_controller_manager_rrbot_generic_controllers.yaml", ] ), ], diff --git a/example_15/doc/userdoc.rst b/example_15/doc/userdoc.rst index 8b2b65cab..55a9ae207 100644 --- a/example_15/doc/userdoc.rst +++ b/example_15/doc/userdoc.rst @@ -80,8 +80,7 @@ Scenario: Using multiple controller managers on the same machine * Launch file: `multi_controller_manager_example_two_rrbots.launch.py `__ * Controllers yaml: - - `multi_controller_manager_rrbot_1_controllers.yaml `__ - - `multi_controller_manager_rrbot_2_controllers.yaml `__ + - `multi_controller_manager_generic_controllers.yaml `__ * URDF file: `rrbot.urdf.xacro `__ * Description: `rrbot_description.urdf.xacro `__