From 1e11bc5b0e1c4295a37c00908ccd00c6511999ca Mon Sep 17 00:00:00 2001 From: Christoph Froehlich Date: Mon, 25 Dec 2023 17:52:39 +0000 Subject: [PATCH] Use global joint_state_broadcaster --- example_13/bringup/config/three_robots_controllers.yaml | 7 +++++++ example_13/bringup/launch/three_robots.launch.py | 7 ------- example_13/doc/userdoc.rst | 9 +++++++-- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/example_13/bringup/config/three_robots_controllers.yaml b/example_13/bringup/config/three_robots_controllers.yaml index fb66334de..2a534cade 100644 --- a/example_13/bringup/config/three_robots_controllers.yaml +++ b/example_13/bringup/config/three_robots_controllers.yaml @@ -45,10 +45,15 @@ controller_manager: threedofbot_pid_gain_controller: type: forward_command_controller/ForwardCommandController +# global joint_state_broadcaster +# joint_state_broadcaster: +# ros__parameters: + # nothing to configure # RRBot controllers rrbot_joint_state_broadcaster: ros__parameters: + use_local_topics: True joints: - rrbot_joint1 - rrbot_joint2 @@ -71,6 +76,7 @@ rrbot_external_fts_broadcaster: # RRBot with sensor controllers rrbot_with_sensor_joint_state_broadcaster: ros__parameters: + use_local_topics: True joints: - rrbot_with_sensor_joint1 - rrbot_with_sensor_joint2 @@ -93,6 +99,7 @@ rrbot_with_sensor_fts_broadcaster: # ThreeDofBot controllers threedofbot_joint_state_broadcaster: ros__parameters: + use_local_topics: True joints: - threedofbot_joint1 - threedofbot_joint2 diff --git a/example_13/bringup/launch/three_robots.launch.py b/example_13/bringup/launch/three_robots.launch.py index d30d9c4ea..7f581a8fb 100644 --- a/example_13/bringup/launch/three_robots.launch.py +++ b/example_13/bringup/launch/three_robots.launch.py @@ -77,13 +77,6 @@ def generate_launch_description(): package="controller_manager", executable="ros2_control_node", parameters=[robot_description, robot_controllers], - remappings=[ - ("/joint_state_broadcaster/joint_states", "joint_states"), - ], - output={ - "stdout": "screen", - "stderr": "screen", - }, ) robot_state_pub_node = Node( package="robot_state_publisher", diff --git a/example_13/doc/userdoc.rst b/example_13/doc/userdoc.rst index 5bd8fd140..13ccc59f8 100644 --- a/example_13/doc/userdoc.rst +++ b/example_13/doc/userdoc.rst @@ -117,12 +117,17 @@ Tutorial steps 1. After starting the example there should be the following scene: - right robot is moving (RRBotSystemPositionOnly - using auto-start) + - All interfaces are available and position controller is started and receives commands - all controllers running + - left robot is standing upright (RRBotWithSensor - using auto-configure) + - only state interfaces are available therefore it can visualized, but not moved - only position command controller is not running + - middle robot is "broken" (FakeThreeDofBot - it is only initialized) + - no interfaces are available - all controllers inactive @@ -248,7 +253,7 @@ Tutorial steps - right robot is moving - left robot is moving - - middle robot is standing still + - middle robot is still "broken" Hardware status: ``FakeThreeDofBot`` is in inactive state. @@ -377,7 +382,7 @@ Tutorial steps Scenario state: - - right robot is "standing" + - right robot is now "standing" at the last position - left robot is moving - middle robot is moving