From 14f160bba4298c1974178c2746579d352be40a11 Mon Sep 17 00:00:00 2001 From: Yue Yin Date: Mon, 2 Jun 2025 14:57:49 +0900 Subject: [PATCH] fix: malfunctioning launch script (#19) ## Issue - **openarm_bringup/openarm.launch.py** was launching rviz2 with an incorrect configuration file. - The same launch script is intended to execute xacro with a configurable prefix and support mock hardware. However, these features were not functioning as the required arguments and plugin initialization were missing from the xacro files. ## Fix - Updated the rviz configuration path to the correct file. - Added the necessary arguments and plugin setup to the relevant xacro files to enable prefix configuration and mock hardware support. --- openarm_bringup/launch/openarm.launch.py | 2 +- .../urdf/openarm.ros2_control.xacro | 16 ++++++++++------ openarm_description/urdf/openarm.urdf.xacro | 6 +++++- openarm_description/urdf/openarm.xacro | 4 ++-- 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/openarm_bringup/launch/openarm.launch.py b/openarm_bringup/launch/openarm.launch.py index 84994ac..84246f0 100644 --- a/openarm_bringup/launch/openarm.launch.py +++ b/openarm_bringup/launch/openarm.launch.py @@ -131,7 +131,7 @@ def generate_launch_description(): [FindPackageShare(runtime_config_package), "config", controllers_file] ) rviz_config_file = PathJoinSubstitution( - [FindPackageShare(description_package), "rviz", "openarm.rviz"] + [FindPackageShare(description_package), "rviz", "robot_description.rviz"] ) control_node = Node( diff --git a/openarm_description/urdf/openarm.ros2_control.xacro b/openarm_description/urdf/openarm.ros2_control.xacro index a06b9ed..0d01383 100644 --- a/openarm_description/urdf/openarm.ros2_control.xacro +++ b/openarm_description/urdf/openarm.ros2_control.xacro @@ -15,16 +15,20 @@  limitations under the License. --> - + - - - openarm_hardware/OpenArmHW - ${prefix} - ${can_device} + + mock_components/GenericSystem + ${mock_sensor_commands} + + + openarm_hardware/OpenArmHW + ${prefix} + ${can_device} + diff --git a/openarm_description/urdf/openarm.urdf.xacro b/openarm_description/urdf/openarm.urdf.xacro index c39005e..e092c00 100644 --- a/openarm_description/urdf/openarm.urdf.xacro +++ b/openarm_description/urdf/openarm.urdf.xacro @@ -15,7 +15,11 @@  limitations under the License. --> + + + + - + diff --git a/openarm_description/urdf/openarm.xacro b/openarm_description/urdf/openarm.xacro index 9a8d6dc..cca28e9 100644 --- a/openarm_description/urdf/openarm.xacro +++ b/openarm_description/urdf/openarm.xacro @@ -23,7 +23,7 @@ - + @@ -34,7 +34,7 @@ - +