diff --git a/example_1/bringup/config/rrbot_controllers.yaml b/example_1/bringup/config/rrbot_controllers.yaml index e98fce3b1..04ac6328e 100644 --- a/example_1/bringup/config/rrbot_controllers.yaml +++ b/example_1/bringup/config/rrbot_controllers.yaml @@ -5,15 +5,10 @@ controller_manager: joint_state_broadcaster: type: joint_state_broadcaster/JointStateBroadcaster - forward_position_controller: - type: forward_command_controller/ForwardCommandController - - joint_trajectory_position_controller: - type: joint_trajectory_controller/JointTrajectoryController - forward_position_controller: ros__parameters: + type: forward_command_controller/ForwardCommandController joints: - joint1 - joint2 @@ -22,6 +17,8 @@ forward_position_controller: joint_trajectory_position_controller: ros__parameters: + type: joint_trajectory_controller/JointTrajectoryController + joints: - joint1 - joint2 diff --git a/example_1/bringup/launch/rrbot.launch.py b/example_1/bringup/launch/rrbot.launch.py index e79ef34f2..23ad9850e 100644 --- a/example_1/bringup/launch/rrbot.launch.py +++ b/example_1/bringup/launch/rrbot.launch.py @@ -88,13 +88,13 @@ def generate_launch_description(): joint_state_broadcaster_spawner = Node( package="controller_manager", executable="spawner", - arguments=["joint_state_broadcaster", "--controller-manager", "/controller_manager"], + arguments=["joint_state_broadcaster"], ) robot_controller_spawner = Node( package="controller_manager", executable="spawner", - arguments=["forward_position_controller", "--controller-manager", "/controller_manager"], + arguments=["forward_position_controller", "--param-file", robot_controllers], ) # Delay rviz start after `joint_state_broadcaster` diff --git a/example_10/bringup/config/rrbot_controllers.yaml b/example_10/bringup/config/rrbot_controllers.yaml index 90434b572..0211d44ef 100644 --- a/example_10/bringup/config/rrbot_controllers.yaml +++ b/example_10/bringup/config/rrbot_controllers.yaml @@ -5,15 +5,10 @@ controller_manager: joint_state_broadcaster: type: joint_state_broadcaster/JointStateBroadcaster - forward_position_controller: - type: forward_command_controller/ForwardCommandController - - gpio_controller: - type: ros2_control_demo_example_10/GPIOController - forward_position_controller: ros__parameters: + type: forward_command_controller/ForwardCommandController joints: - joint1 - joint2 @@ -21,6 +16,7 @@ forward_position_controller: gpio_controller: ros__parameters: + type: ros2_control_demo_example_10/GPIOController inputs: - flange_analog_IOs/analog_output1 - flange_analog_IOs/analog_input1 diff --git a/example_10/bringup/launch/rrbot.launch.py b/example_10/bringup/launch/rrbot.launch.py index bdcd9ee3d..1fdda5610 100644 --- a/example_10/bringup/launch/rrbot.launch.py +++ b/example_10/bringup/launch/rrbot.launch.py @@ -78,19 +78,19 @@ def generate_launch_description(): joint_state_broadcaster_spawner = Node( package="controller_manager", executable="spawner", - arguments=["joint_state_broadcaster", "--controller-manager", "/controller_manager"], + arguments=["joint_state_broadcaster"], ) robot_controller_spawner = Node( package="controller_manager", executable="spawner", - arguments=["forward_position_controller", "-c", "/controller_manager"], + arguments=["forward_position_controller", "--param-file", robot_controllers], ) gpio_controller_spawner = Node( package="controller_manager", executable="spawner", - arguments=["gpio_controller", "-c", "/controller_manager"], + arguments=["gpio_controller", "--param-file", robot_controllers], ) # Delay start of joint_state_broadcaster after `robot_controller` diff --git a/example_11/bringup/config/carlikebot_controllers.yaml b/example_11/bringup/config/carlikebot_controllers.yaml index 7961764f3..11f355ebe 100644 --- a/example_11/bringup/config/carlikebot_controllers.yaml +++ b/example_11/bringup/config/carlikebot_controllers.yaml @@ -5,12 +5,10 @@ controller_manager: joint_state_broadcaster: type: joint_state_broadcaster/JointStateBroadcaster - bicycle_steering_controller: - type: bicycle_steering_controller/BicycleSteeringController - bicycle_steering_controller: ros__parameters: + type: bicycle_steering_controller/BicycleSteeringController wheelbase: 0.325 front_wheel_radius: 0.05 rear_wheel_radius: 0.05 diff --git a/example_11/bringup/launch/carlikebot.launch.py b/example_11/bringup/launch/carlikebot.launch.py index 200363eb7..47c3c3327 100644 --- a/example_11/bringup/launch/carlikebot.launch.py +++ b/example_11/bringup/launch/carlikebot.launch.py @@ -108,13 +108,13 @@ def generate_launch_description(): joint_state_broadcaster_spawner = Node( package="controller_manager", executable="spawner", - arguments=["joint_state_broadcaster", "--controller-manager", "/controller_manager"], + arguments=["joint_state_broadcaster"], ) robot_bicycle_controller_spawner = Node( package="controller_manager", executable="spawner", - arguments=["bicycle_steering_controller", "--controller-manager", "/controller_manager"], + arguments=["bicycle_steering_controller", "--param-file", robot_controllers], ) # Delay rviz start after `joint_state_broadcaster` diff --git a/example_12/bringup/config/rrbot_chained_controllers.yaml b/example_12/bringup/config/rrbot_chained_controllers.yaml index e85198763..ccd7ddff9 100644 --- a/example_12/bringup/config/rrbot_chained_controllers.yaml +++ b/example_12/bringup/config/rrbot_chained_controllers.yaml @@ -5,32 +5,22 @@ controller_manager: joint_state_broadcaster: type: joint_state_broadcaster/JointStateBroadcaster - joint1_position_controller: - type: passthrough_controller/PassthroughController - - joint2_position_controller: - type: passthrough_controller/PassthroughController - - position_controller: - type: passthrough_controller/PassthroughController - - forward_position_controller: - type: forward_command_controller/ForwardCommandController # First-level controllers joint1_position_controller: ros__parameters: + type: passthrough_controller/PassthroughController interfaces: ["joint1/position"] - joint2_position_controller: ros__parameters: + type: passthrough_controller/PassthroughController interfaces: ["joint2/position"] - # Second-level controller position_controller: ros__parameters: + type: passthrough_controller/PassthroughController interfaces: - joint1_position_controller/joint1/position - joint2_position_controller/joint2/position @@ -38,6 +28,7 @@ position_controller: # Third-level controllers forward_position_controller: ros__parameters: + type: forward_command_controller/ForwardCommandController joints: - position_controller/joint1_position_controller/joint1 - position_controller/joint2_position_controller/joint2 diff --git a/example_12/bringup/launch/launch_chained_controllers.launch.py b/example_12/bringup/launch/launch_chained_controllers.launch.py index d12717700..85de861ce 100644 --- a/example_12/bringup/launch/launch_chained_controllers.launch.py +++ b/example_12/bringup/launch/launch_chained_controllers.launch.py @@ -16,21 +16,31 @@ from launch import LaunchDescription from launch.actions import RegisterEventHandler from launch.event_handlers import OnProcessExit +from launch.substitutions import PathJoinSubstitution from launch_ros.actions import Node +from launch_ros.substitutions import FindPackageShare def generate_launch_description(): + robot_controllers = PathJoinSubstitution( + [ + FindPackageShare("ros2_control_demo_example_12"), + "config", + "rrbot_chained_controllers.yaml", + ] + ) + position_controller_spawner = Node( package="controller_manager", executable="spawner", - arguments=["position_controller", "--controller-manager", "/controller_manager"], + arguments=["position_controller", "--param-file", robot_controllers], ) forward_position_controller_spawner = Node( package="controller_manager", executable="spawner", - arguments=["forward_position_controller", "--controller-manager", "/controller_manager"], + arguments=["forward_position_controller", "--param-file", robot_controllers], ) # Delay start of forward_position_controller_spawner after `position_controller_spawner` diff --git a/example_12/bringup/launch/rrbot.launch.py b/example_12/bringup/launch/rrbot.launch.py index cdf3430ba..d2255deb5 100644 --- a/example_12/bringup/launch/rrbot.launch.py +++ b/example_12/bringup/launch/rrbot.launch.py @@ -88,19 +88,19 @@ def generate_launch_description(): joint_state_broadcaster_spawner = Node( package="controller_manager", executable="spawner", - arguments=["joint_state_broadcaster", "--controller-manager", "/controller_manager"], + arguments=["joint_state_broadcaster"], ) j1_controller_spawner = Node( package="controller_manager", executable="spawner", - arguments=["joint1_position_controller", "--controller-manager", "/controller_manager"], + arguments=["joint1_position_controller", "--param-file", robot_controllers], ) j2_controller_spawner = Node( package="controller_manager", executable="spawner", - arguments=["joint2_position_controller", "--controller-manager", "/controller_manager"], + arguments=["joint2_position_controller", "--param-file", robot_controllers], ) # Delay rviz start after `joint_state_broadcaster` diff --git a/example_14/bringup/config/rrbot_modular_actuators_without_feedback_sensors_for_position_feedback.yaml b/example_14/bringup/config/rrbot_modular_actuators_without_feedback_sensors_for_position_feedback.yaml index 7763a69d1..fdf375705 100644 --- a/example_14/bringup/config/rrbot_modular_actuators_without_feedback_sensors_for_position_feedback.yaml +++ b/example_14/bringup/config/rrbot_modular_actuators_without_feedback_sensors_for_position_feedback.yaml @@ -5,12 +5,10 @@ controller_manager: joint_state_broadcaster: type: joint_state_broadcaster/JointStateBroadcaster - forward_velocity_controller: - type: forward_command_controller/ForwardCommandController - forward_velocity_controller: ros__parameters: + type: forward_command_controller/ForwardCommandController joints: - joint1 - joint2 diff --git a/example_14/bringup/launch/rrbot_modular_actuators_without_feedback_sensors_for_position_feedback.launch.py b/example_14/bringup/launch/rrbot_modular_actuators_without_feedback_sensors_for_position_feedback.launch.py index c12e153f6..1dc258917 100644 --- a/example_14/bringup/launch/rrbot_modular_actuators_without_feedback_sensors_for_position_feedback.launch.py +++ b/example_14/bringup/launch/rrbot_modular_actuators_without_feedback_sensors_for_position_feedback.launch.py @@ -117,13 +117,13 @@ def generate_launch_description(): joint_state_broadcaster_spawner = Node( package="controller_manager", executable="spawner", - arguments=["joint_state_broadcaster", "--controller-manager", "/controller_manager"], + arguments=["joint_state_broadcaster"], ) robot_controller_spawner = Node( package="controller_manager", executable="spawner", - arguments=[robot_controller, "--controller-manager", "/controller_manager"], + arguments=[robot_controller, "--param-file", robot_controllers], ) # Delay rviz start after `joint_state_broadcaster` diff --git a/example_15/bringup/config/multi_controller_manager_rrbot_1_controllers.yaml b/example_15/bringup/config/multi_controller_manager_rrbot_1_controllers.yaml index 784c8d5ba..973035d93 100644 --- a/example_15/bringup/config/multi_controller_manager_rrbot_1_controllers.yaml +++ b/example_15/bringup/config/multi_controller_manager_rrbot_1_controllers.yaml @@ -5,15 +5,10 @@ joint_state_broadcaster: type: joint_state_broadcaster/JointStateBroadcaster - forward_position_controller: - type: forward_command_controller/ForwardCommandController - - position_trajectory_controller: - type: joint_trajectory_controller/JointTrajectoryController - /rrbot_1/forward_position_controller: ros__parameters: + type: forward_command_controller/ForwardCommandController joints: - rrbot_1_joint1 - rrbot_1_joint2 @@ -22,6 +17,7 @@ /rrbot_1/position_trajectory_controller: ros__parameters: + type: joint_trajectory_controller/JointTrajectoryController joints: - rrbot_1_joint1 - rrbot_1_joint2 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 index a987e786a..9738c6ae2 100644 --- a/example_15/bringup/config/multi_controller_manager_rrbot_2_controllers.yaml +++ b/example_15/bringup/config/multi_controller_manager_rrbot_2_controllers.yaml @@ -5,15 +5,10 @@ joint_state_broadcaster: type: joint_state_broadcaster/JointStateBroadcaster - forward_position_controller: - type: forward_command_controller/ForwardCommandController - - position_trajectory_controller: - type: joint_trajectory_controller/JointTrajectoryController - /rrbot_2/forward_position_controller: ros__parameters: + type: forward_command_controller/ForwardCommandController joints: - rrbot_2_joint1 - rrbot_2_joint2 @@ -22,6 +17,7 @@ /rrbot_2/position_trajectory_controller: ros__parameters: + type: joint_trajectory_controller/JointTrajectoryController joints: - rrbot_2_joint1 - rrbot_2_joint2 diff --git a/example_15/bringup/config/rrbot_namespace_controllers.yaml b/example_15/bringup/config/rrbot_namespace_controllers.yaml index dd97d34ec..9bd3ced29 100644 --- a/example_15/bringup/config/rrbot_namespace_controllers.yaml +++ b/example_15/bringup/config/rrbot_namespace_controllers.yaml @@ -5,15 +5,10 @@ joint_state_broadcaster: type: joint_state_broadcaster/JointStateBroadcaster - forward_position_controller: - type: forward_command_controller/ForwardCommandController - - position_trajectory_controller: - type: joint_trajectory_controller/JointTrajectoryController - /rrbot/forward_position_controller: ros__parameters: + type: forward_command_controller/ForwardCommandController joints: - joint1 - joint2 @@ -22,6 +17,7 @@ /rrbot/position_trajectory_controller: ros__parameters: + type: joint_trajectory_controller/JointTrajectoryController joints: - joint1 - joint2 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 1af2ee8b4..7e5b99cc2 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 @@ -90,11 +90,18 @@ def generate_launch_description(): rrbot_1_position_trajectory_controller_spawner = Node( package="controller_manager", executable="spawner", + namespace="rrbot_1", arguments=[ "position_trajectory_controller", - "-c", - "/rrbot_1/controller_manager", "--inactive", + "--param-file", + PathJoinSubstitution( + [ + FindPackageShare("ros2_control_demo_example_15"), + "config", + "multi_controller_manager_rrbot_1_controllers.yaml", + ] + ), ], ) @@ -119,11 +126,18 @@ def generate_launch_description(): rrbot_2_position_trajectory_controller_spawner = Node( package="controller_manager", executable="spawner", + namespace="rrbot_2", arguments=[ "position_trajectory_controller", - "-c", - "/rrbot_2/controller_manager", "--inactive", + "--param-file", + PathJoinSubstitution( + [ + FindPackageShare("ros2_control_demo_example_15"), + "config", + "multi_controller_manager_rrbot_2_controllers.yaml", + ] + ), ], ) diff --git a/example_15/bringup/launch/rrbot_base.launch.py b/example_15/bringup/launch/rrbot_base.launch.py index b64b4e192..d5fed3f91 100644 --- a/example_15/bringup/launch/rrbot_base.launch.py +++ b/example_15/bringup/launch/rrbot_base.launch.py @@ -209,7 +209,13 @@ def generate_launch_description(): package="controller_manager", executable="spawner", namespace=namespace, - arguments=[robot_controller, "-c", controller_manager_name], + arguments=[ + robot_controller, + "-c", + controller_manager_name, + "--param-file", + robot_controllers, + ], ) # Delay rviz start after `joint_state_broadcaster` diff --git a/example_15/bringup/launch/rrbot_namespace.launch.py b/example_15/bringup/launch/rrbot_namespace.launch.py index 3fab3632e..032bb32a4 100644 --- a/example_15/bringup/launch/rrbot_namespace.launch.py +++ b/example_15/bringup/launch/rrbot_namespace.launch.py @@ -99,23 +99,26 @@ def generate_launch_description(): joint_state_broadcaster_spawner = Node( package="controller_manager", executable="spawner", - arguments=["joint_state_broadcaster", "-c", "/rrbot/controller_manager"], + namespace="rrbot", + arguments=["joint_state_broadcaster"], ) robot_forward_position_controller_spawner = Node( package="controller_manager", executable="spawner", - arguments=["forward_position_controller", "-c", "/rrbot/controller_manager"], + namespace="rrbot", + arguments=["forward_position_controller", "--param-file", robot_controllers], ) robot_position_trajectory_controller_spawner = Node( package="controller_manager", executable="spawner", + namespace="rrbot", arguments=[ "position_trajectory_controller", - "-c", - "/rrbot/controller_manager", "--inactive", + "--param-file", + robot_controllers, ], ) diff --git a/example_2/bringup/config/diffbot_controllers.yaml b/example_2/bringup/config/diffbot_controllers.yaml index 4f1ad7037..47f1c4c9c 100644 --- a/example_2/bringup/config/diffbot_controllers.yaml +++ b/example_2/bringup/config/diffbot_controllers.yaml @@ -5,11 +5,10 @@ controller_manager: joint_state_broadcaster: type: joint_state_broadcaster/JointStateBroadcaster - diffbot_base_controller: - type: diff_drive_controller/DiffDriveController - diffbot_base_controller: ros__parameters: + type: diff_drive_controller/DiffDriveController + left_wheel_names: ["left_wheel_joint"] right_wheel_names: ["right_wheel_joint"] diff --git a/example_2/bringup/launch/diffbot.launch.py b/example_2/bringup/launch/diffbot.launch.py index 02a5535cf..0e9787776 100644 --- a/example_2/bringup/launch/diffbot.launch.py +++ b/example_2/bringup/launch/diffbot.launch.py @@ -97,13 +97,13 @@ def generate_launch_description(): joint_state_broadcaster_spawner = Node( package="controller_manager", executable="spawner", - arguments=["joint_state_broadcaster", "--controller-manager", "/controller_manager"], + arguments=["joint_state_broadcaster"], ) robot_controller_spawner = Node( package="controller_manager", executable="spawner", - arguments=["diffbot_base_controller", "--controller-manager", "/controller_manager"], + arguments=["diffbot_base_controller", "--param-file", robot_controllers], ) # Delay rviz start after `joint_state_broadcaster` diff --git a/example_3/bringup/config/rrbot_multi_interface_forward_controllers.yaml b/example_3/bringup/config/rrbot_multi_interface_forward_controllers.yaml index 6bffd2754..9ac21ff51 100644 --- a/example_3/bringup/config/rrbot_multi_interface_forward_controllers.yaml +++ b/example_3/bringup/config/rrbot_multi_interface_forward_controllers.yaml @@ -2,38 +2,26 @@ controller_manager: ros__parameters: update_rate: 10 # Hz - forward_position_controller: - type: position_controllers/JointGroupPositionController - - forward_velocity_controller: - type: velocity_controllers/JointGroupVelocityController - - forward_acceleration_controller: - type: forward_command_controller/ForwardCommandController - - forward_illegal1_controller: - type: forward_command_controller/ForwardCommandController - - forward_illegal2_controller: - type: forward_command_controller/ForwardCommandController - joint_state_broadcaster: type: joint_state_broadcaster/JointStateBroadcaster forward_position_controller: ros__parameters: + type: position_controllers/JointGroupPositionController joints: - joint1 - joint2 forward_velocity_controller: ros__parameters: + type: velocity_controllers/JointGroupVelocityController joints: - joint1 - joint2 forward_acceleration_controller: ros__parameters: + type: forward_command_controller/ForwardCommandController joints: - joint1 - joint2 @@ -41,12 +29,14 @@ forward_acceleration_controller: forward_illegal1_controller: ros__parameters: + type: forward_command_controller/ForwardCommandController joints: - joint1 interface_name: position forward_illegal2_controller: ros__parameters: + type: forward_command_controller/ForwardCommandController joints: - joint2 interface_name: position diff --git a/example_3/bringup/launch/rrbot_system_multi_interface.launch.py b/example_3/bringup/launch/rrbot_system_multi_interface.launch.py index 161c44fab..587a77b32 100644 --- a/example_3/bringup/launch/rrbot_system_multi_interface.launch.py +++ b/example_3/bringup/launch/rrbot_system_multi_interface.launch.py @@ -140,13 +140,13 @@ def generate_launch_description(): joint_state_broadcaster_spawner = Node( package="controller_manager", executable="spawner", - arguments=["joint_state_broadcaster", "--controller-manager", "/controller_manager"], + arguments=["joint_state_broadcaster"], ) robot_controller_spawner = Node( package="controller_manager", executable="spawner", - arguments=[robot_controller, "--controller-manager", "/controller_manager"], + arguments=[robot_controller, "--param-file", robot_controllers], ) # Delay rviz start after `joint_state_broadcaster` diff --git a/example_4/bringup/config/rrbot_with_sensor_controllers.yaml b/example_4/bringup/config/rrbot_with_sensor_controllers.yaml index bbd2c5d8e..4692c0bbc 100644 --- a/example_4/bringup/config/rrbot_with_sensor_controllers.yaml +++ b/example_4/bringup/config/rrbot_with_sensor_controllers.yaml @@ -2,17 +2,12 @@ controller_manager: ros__parameters: update_rate: 10 # Hz - forward_position_controller: - type: forward_command_controller/ForwardCommandController - - fts_broadcaster: - type: force_torque_sensor_broadcaster/ForceTorqueSensorBroadcaster - joint_state_broadcaster: type: joint_state_broadcaster/JointStateBroadcaster forward_position_controller: ros__parameters: + type: forward_command_controller/ForwardCommandController joints: - joint1 - joint2 @@ -20,6 +15,7 @@ forward_position_controller: fts_broadcaster: ros__parameters: + type: force_torque_sensor_broadcaster/ForceTorqueSensorBroadcaster interface_names.force.x: tcp_fts_sensor/force.x interface_names.torque.z: tcp_fts_sensor/torque.z frame_id: tool_link diff --git a/example_4/bringup/launch/rrbot_system_with_sensor.launch.py b/example_4/bringup/launch/rrbot_system_with_sensor.launch.py index c3ce71b54..e81257a92 100644 --- a/example_4/bringup/launch/rrbot_system_with_sensor.launch.py +++ b/example_4/bringup/launch/rrbot_system_with_sensor.launch.py @@ -132,20 +132,20 @@ def generate_launch_description(): joint_state_broadcaster_spawner = Node( package="controller_manager", executable="spawner", - arguments=["joint_state_broadcaster", "--controller-manager", "/controller_manager"], + arguments=["joint_state_broadcaster"], ) robot_controller_spawner = Node( package="controller_manager", executable="spawner", - arguments=["forward_position_controller", "--controller-manager", "/controller_manager"], + arguments=["forward_position_controller", "--param-file", robot_controllers], ) # add the spawner node for the fts_broadcaster fts_broadcaster_spawner = Node( package="controller_manager", executable="spawner", - arguments=["fts_broadcaster", "--controller-manager", "/controller_manager"], + arguments=["fts_broadcaster", "--param-file", robot_controllers], ) # Delay rviz start after `joint_state_broadcaster` diff --git a/example_5/bringup/config/rrbot_with_external_sensor_controllers.yaml b/example_5/bringup/config/rrbot_with_external_sensor_controllers.yaml index 5b650ea7e..d4e43a1d2 100644 --- a/example_5/bringup/config/rrbot_with_external_sensor_controllers.yaml +++ b/example_5/bringup/config/rrbot_with_external_sensor_controllers.yaml @@ -2,17 +2,12 @@ controller_manager: ros__parameters: update_rate: 10 # Hz - forward_position_controller: - type: forward_command_controller/ForwardCommandController - - fts_broadcaster: - type: force_torque_sensor_broadcaster/ForceTorqueSensorBroadcaster - joint_state_broadcaster: type: joint_state_broadcaster/JointStateBroadcaster forward_position_controller: ros__parameters: + type: forward_command_controller/ForwardCommandController joints: - joint1 - joint2 @@ -20,5 +15,6 @@ forward_position_controller: fts_broadcaster: ros__parameters: + type: force_torque_sensor_broadcaster/ForceTorqueSensorBroadcaster sensor_name: tcp_fts_sensor frame_id: tool_link diff --git a/example_5/bringup/launch/rrbot_system_with_external_sensor.launch.py b/example_5/bringup/launch/rrbot_system_with_external_sensor.launch.py index 45d646b09..b69d96fbd 100755 --- a/example_5/bringup/launch/rrbot_system_with_external_sensor.launch.py +++ b/example_5/bringup/launch/rrbot_system_with_external_sensor.launch.py @@ -132,20 +132,20 @@ def generate_launch_description(): joint_state_broadcaster_spawner = Node( package="controller_manager", executable="spawner", - arguments=["joint_state_broadcaster", "--controller-manager", "/controller_manager"], + arguments=["joint_state_broadcaster"], ) robot_controller_spawner = Node( package="controller_manager", executable="spawner", - arguments=["forward_position_controller", "--controller-manager", "/controller_manager"], + arguments=["forward_position_controller", "--param-file", robot_controllers], ) # add the spawner node for the fts_broadcaster fts_broadcaster_spawner = Node( package="controller_manager", executable="spawner", - arguments=["fts_broadcaster", "--controller-manager", "/controller_manager"], + arguments=["fts_broadcaster", "--param-file", robot_controllers], ) # Delay rviz start after `joint_state_broadcaster` diff --git a/example_6/bringup/config/rrbot_modular_actuators.yaml b/example_6/bringup/config/rrbot_modular_actuators.yaml index 66f79d0ff..0a658759c 100644 --- a/example_6/bringup/config/rrbot_modular_actuators.yaml +++ b/example_6/bringup/config/rrbot_modular_actuators.yaml @@ -5,12 +5,10 @@ controller_manager: joint_state_broadcaster: type: joint_state_broadcaster/JointStateBroadcaster - forward_position_controller: - type: forward_command_controller/ForwardCommandController - forward_position_controller: ros__parameters: + type: forward_command_controller/ForwardCommandController joints: - joint1 - joint2 diff --git a/example_6/bringup/launch/rrbot_modular_actuators.launch.py b/example_6/bringup/launch/rrbot_modular_actuators.launch.py index 52ac6ff5d..64ecd5e65 100644 --- a/example_6/bringup/launch/rrbot_modular_actuators.launch.py +++ b/example_6/bringup/launch/rrbot_modular_actuators.launch.py @@ -140,13 +140,13 @@ def generate_launch_description(): joint_state_broadcaster_spawner = Node( package="controller_manager", executable="spawner", - arguments=["joint_state_broadcaster", "--controller-manager", "/controller_manager"], + arguments=["joint_state_broadcaster"], ) robot_controller_spawner = Node( package="controller_manager", executable="spawner", - arguments=[robot_controller, "--controller-manager", "/controller_manager"], + arguments=[robot_controller, "--param-file", robot_controllers], ) # Delay rviz start after `joint_state_broadcaster` diff --git a/example_7/bringup/config/r6bot_controller.yaml b/example_7/bringup/config/r6bot_controller.yaml index 222d00a84..dcef5eb8e 100644 --- a/example_7/bringup/config/r6bot_controller.yaml +++ b/example_7/bringup/config/r6bot_controller.yaml @@ -5,12 +5,10 @@ controller_manager: joint_state_broadcaster: type: joint_state_broadcaster/JointStateBroadcaster - r6bot_controller: - type: ros2_control_demo_example_7/RobotController - r6bot_controller: ros__parameters: + type: ros2_control_demo_example_7/RobotController joints: - joint_1 - joint_2 diff --git a/example_7/bringup/launch/r6bot_controller.launch.py b/example_7/bringup/launch/r6bot_controller.launch.py index ea86cbe74..e34795b97 100644 --- a/example_7/bringup/launch/r6bot_controller.launch.py +++ b/example_7/bringup/launch/r6bot_controller.launch.py @@ -91,13 +91,13 @@ def generate_launch_description(): joint_state_broadcaster_spawner = Node( package="controller_manager", executable="spawner", - arguments=["joint_state_broadcaster", "--controller-manager", "/controller_manager"], + arguments=["joint_state_broadcaster"], ) robot_controller_spawner = Node( package="controller_manager", executable="spawner", - arguments=["r6bot_controller", "-c", "/controller_manager"], + arguments=["r6bot_controller", "--param-file", robot_controllers], ) # Delay rviz start after `joint_state_broadcaster` diff --git a/example_8/bringup/config/rrbot_controllers.yaml b/example_8/bringup/config/rrbot_controllers.yaml index 66f79d0ff..0a658759c 100644 --- a/example_8/bringup/config/rrbot_controllers.yaml +++ b/example_8/bringup/config/rrbot_controllers.yaml @@ -5,12 +5,10 @@ controller_manager: joint_state_broadcaster: type: joint_state_broadcaster/JointStateBroadcaster - forward_position_controller: - type: forward_command_controller/ForwardCommandController - forward_position_controller: ros__parameters: + type: forward_command_controller/ForwardCommandController joints: - joint1 - joint2 diff --git a/example_8/bringup/launch/rrbot_transmissions_system_position_only.launch.py b/example_8/bringup/launch/rrbot_transmissions_system_position_only.launch.py index 004d44176..94d8bfdbc 100644 --- a/example_8/bringup/launch/rrbot_transmissions_system_position_only.launch.py +++ b/example_8/bringup/launch/rrbot_transmissions_system_position_only.launch.py @@ -117,13 +117,13 @@ def generate_launch_description(): joint_state_broadcaster_spawner = Node( package="controller_manager", executable="spawner", - arguments=["joint_state_broadcaster", "--controller-manager", "/controller_manager"], + arguments=["joint_state_broadcaster"], ) robot_controller_spawner = Node( package="controller_manager", executable="spawner", - arguments=[robot_controller, "--controller-manager", "/controller_manager"], + arguments=[robot_controller, "--param-file", robot_controllers], ) # Delay rviz start after `joint_state_broadcaster` diff --git a/example_9/bringup/config/rrbot_controllers.yaml b/example_9/bringup/config/rrbot_controllers.yaml index 383757513..0a658759c 100644 --- a/example_9/bringup/config/rrbot_controllers.yaml +++ b/example_9/bringup/config/rrbot_controllers.yaml @@ -5,11 +5,10 @@ controller_manager: joint_state_broadcaster: type: joint_state_broadcaster/JointStateBroadcaster - forward_position_controller: - type: forward_command_controller/ForwardCommandController forward_position_controller: ros__parameters: + type: forward_command_controller/ForwardCommandController joints: - joint1 - joint2 diff --git a/example_9/bringup/launch/rrbot.launch.py b/example_9/bringup/launch/rrbot.launch.py index 744b61631..9e21fc8a9 100644 --- a/example_9/bringup/launch/rrbot.launch.py +++ b/example_9/bringup/launch/rrbot.launch.py @@ -89,13 +89,13 @@ def generate_launch_description(): joint_state_broadcaster_spawner = Node( package="controller_manager", executable="spawner", - arguments=["joint_state_broadcaster", "--controller-manager", "/controller_manager"], + arguments=["joint_state_broadcaster"], ) robot_controller_spawner = Node( package="controller_manager", executable="spawner", - arguments=["forward_position_controller", "--controller-manager", "/controller_manager"], + arguments=["forward_position_controller", "--param-file", robot_controllers], ) # Delay rviz start after `joint_state_broadcaster` diff --git a/example_9/bringup/launch/rrbot_gazebo.launch.py b/example_9/bringup/launch/rrbot_gazebo.launch.py index 0f7c185a5..0829a35d3 100644 --- a/example_9/bringup/launch/rrbot_gazebo.launch.py +++ b/example_9/bringup/launch/rrbot_gazebo.launch.py @@ -71,6 +71,15 @@ def generate_launch_description(): ] ) robot_description = {"robot_description": robot_description_content} + + robot_controllers = PathJoinSubstitution( + [ + FindPackageShare("ros2_control_demo_example_9"), + "config", + "rrbot_controllers.yaml", + ] + ) + rviz_config_file = PathJoinSubstitution( [FindPackageShare("ros2_control_demo_description"), "rrbot/rviz", "rrbot.rviz"] ) @@ -85,13 +94,13 @@ def generate_launch_description(): joint_state_broadcaster_spawner = Node( package="controller_manager", executable="spawner", - arguments=["joint_state_broadcaster", "--controller-manager", "/controller_manager"], + arguments=["joint_state_broadcaster"], ) robot_controller_spawner = Node( package="controller_manager", executable="spawner", - arguments=["forward_position_controller", "--controller-manager", "/controller_manager"], + arguments=["forward_position_controller", "--param-file", robot_controllers], ) rviz_node = Node( package="rviz2",