From 71a86bd9bbba2e0022312c5db41d57458ce30de4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20Fr=C3=B6hlich?= Date: Mon, 12 Aug 2024 08:36:40 +0200 Subject: [PATCH] Fix topic remappings (#565) * Fix remapping for ex2 * Cleanup * Fix remapping of ex15 --- .../config/rrbot_namespace_forward_position_publisher.yaml | 2 +- example_15/bringup/launch/rrbot_namespace.launch.py | 3 ++- example_2/bringup/launch/diffbot.launch.py | 6 +++--- example_2/doc/userdoc.rst | 2 +- example_7/bringup/launch/r6bot_controller.launch.py | 6 ------ 5 files changed, 7 insertions(+), 12 deletions(-) diff --git a/example_15/bringup/config/rrbot_namespace_forward_position_publisher.yaml b/example_15/bringup/config/rrbot_namespace_forward_position_publisher.yaml index c022d0873..2730478bc 100644 --- a/example_15/bringup/config/rrbot_namespace_forward_position_publisher.yaml +++ b/example_15/bringup/config/rrbot_namespace_forward_position_publisher.yaml @@ -3,7 +3,7 @@ publisher_forward_position_controller: wait_sec_between_publish: 5 - publish_topic: /rrbot/forward_position_controller/commands + publish_topic: /position_commands goal_names: ["pos1", "pos2", "pos3", "pos4"] pos1: [0.785, 0.785] diff --git a/example_15/bringup/launch/rrbot_namespace.launch.py b/example_15/bringup/launch/rrbot_namespace.launch.py index 032bb32a4..d63a0b040 100644 --- a/example_15/bringup/launch/rrbot_namespace.launch.py +++ b/example_15/bringup/launch/rrbot_namespace.launch.py @@ -71,7 +71,8 @@ def generate_launch_description(): parameters=[robot_description, robot_controllers], remappings=[ ( - "/forward_position_controller/commands", + # we use the remapping from a relative name to FQN /position_commands + "forward_position_controller/commands", "/position_commands", ), ], diff --git a/example_2/bringup/launch/diffbot.launch.py b/example_2/bringup/launch/diffbot.launch.py index 0e9787776..1c345464f 100644 --- a/example_2/bringup/launch/diffbot.launch.py +++ b/example_2/bringup/launch/diffbot.launch.py @@ -75,15 +75,15 @@ def generate_launch_description(): executable="ros2_control_node", parameters=[robot_controllers], output="both", + remappings=[ + ("/diffbot_base_controller/cmd_vel", "/cmd_vel"), + ], ) robot_state_pub_node = Node( package="robot_state_publisher", executable="robot_state_publisher", output="both", parameters=[robot_description], - remappings=[ - ("/diff_drive_controller/cmd_vel_unstamped", "/cmd_vel"), - ], ) rviz_node = Node( package="rviz2", diff --git a/example_2/doc/userdoc.rst b/example_2/doc/userdoc.rst index f5ee8b4cf..207128d4b 100644 --- a/example_2/doc/userdoc.rst +++ b/example_2/doc/userdoc.rst @@ -88,7 +88,7 @@ Tutorial steps .. code-block:: shell - ros2 topic pub --rate 30 /diffbot_base_controller/cmd_vel geometry_msgs/msg/TwistStamped " + ros2 topic pub --rate 30 /cmd_vel geometry_msgs/msg/TwistStamped " twist: linear: x: 0.7 diff --git a/example_7/bringup/launch/r6bot_controller.launch.py b/example_7/bringup/launch/r6bot_controller.launch.py index e34795b97..f397e5311 100644 --- a/example_7/bringup/launch/r6bot_controller.launch.py +++ b/example_7/bringup/launch/r6bot_controller.launch.py @@ -63,12 +63,6 @@ def generate_launch_description(): package="controller_manager", executable="ros2_control_node", parameters=[robot_controllers], - remappings=[ - ( - "/forward_position_controller/commands", - "/position_commands", - ), - ], output="both", ) robot_state_pub_node = Node(