From 403650e96fc111362ad374e19a4c2b81a203a82c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Hern=C3=A1ndez=20Cordero?= Date: Thu, 7 Sep 2023 12:50:14 +0200 Subject: [PATCH] Cleanup controller config (#180) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Alejandro Hernández Cordero (cherry picked from commit 223174515a64008b2ffef5b730c4c61cc78ff8bc) # Conflicts: # ign_ros2_control_demos/launch/cart_example_effort.launch.py --- .../config/cartpole_controller_effort.yaml | 10 ++-------- .../config/cartpole_controller_velocity.yaml | 5 ----- ign_ros2_control_demos/examples/example_effort.cpp | 2 +- .../launch/cart_example_effort.launch.py | 5 +++++ 4 files changed, 8 insertions(+), 14 deletions(-) diff --git a/ign_ros2_control_demos/config/cartpole_controller_effort.yaml b/ign_ros2_control_demos/config/cartpole_controller_effort.yaml index 54b0be31..920e4651 100644 --- a/ign_ros2_control_demos/config/cartpole_controller_effort.yaml +++ b/ign_ros2_control_demos/config/cartpole_controller_effort.yaml @@ -2,19 +2,13 @@ controller_manager: ros__parameters: update_rate: 1000 # Hz - effort_controllers: + effort_controller: type: effort_controllers/JointGroupEffortController joint_state_broadcaster: type: joint_state_broadcaster/JointStateBroadcaster -effort_controllers: +effort_controller: ros__parameters: joints: - slider_to_cart - command_interfaces: - - effort - state_interfaces: - - position - - velocity - - effort diff --git a/ign_ros2_control_demos/config/cartpole_controller_velocity.yaml b/ign_ros2_control_demos/config/cartpole_controller_velocity.yaml index 8d6b6ab0..7215d760 100644 --- a/ign_ros2_control_demos/config/cartpole_controller_velocity.yaml +++ b/ign_ros2_control_demos/config/cartpole_controller_velocity.yaml @@ -15,11 +15,6 @@ velocity_controller: ros__parameters: joints: - slider_to_cart - command_interfaces: - - velocity - state_interfaces: - - position - - velocity imu_sensor_broadcaster: ros__parameters: diff --git a/ign_ros2_control_demos/examples/example_effort.cpp b/ign_ros2_control_demos/examples/example_effort.cpp index 0c2dcf1b..d6fbaa9e 100644 --- a/ign_ros2_control_demos/examples/example_effort.cpp +++ b/ign_ros2_control_demos/examples/example_effort.cpp @@ -26,7 +26,7 @@ int main(int argc, char * argv[]) std::make_shared("effort_test_node"); auto publisher = node->create_publisher( - "/effort_controllers/commands", 10); + "/effort_controller/commands", 10); RCLCPP_INFO(node->get_logger(), "node created"); diff --git a/ign_ros2_control_demos/launch/cart_example_effort.launch.py b/ign_ros2_control_demos/launch/cart_example_effort.launch.py index 29031401..7a645f1c 100644 --- a/ign_ros2_control_demos/launch/cart_example_effort.launch.py +++ b/ign_ros2_control_demos/launch/cart_example_effort.launch.py @@ -66,8 +66,13 @@ def generate_launch_description(): output='screen' ) +<<<<<<< HEAD:ign_ros2_control_demos/launch/cart_example_effort.launch.py load_joint_trajectory_controller = ExecuteProcess( cmd=['ros2', 'control', 'load_controller', '--set-state', 'active', 'effort_controllers'], +======= + load_joint_effort_controller = ExecuteProcess( + cmd=['ros2', 'control', 'load_controller', '--set-state', 'active', 'effort_controller'], +>>>>>>> 2231745 (Cleanup controller config (#180)):gz_ros2_control_demos/launch/cart_example_effort.launch.py output='screen' )