Convert URDF loader to use a parameter
Description
Up to Eloquent, the robot_state_publisher
node receives the file name of the URDF file to load via an argument. From Foxy, this will need to be passed as a parameter using something like the following:
diff --git a/src/urdf/lexus_rx_450h_description/launch/lexus_rx_450h_visualisation.launch.py b/src/urdf/lexus_rx_450h_description/launch/lexus_rx_450h_visualisation.launch.py
index 2300cfc..22dde0a 100644
--- a/src/urdf/lexus_rx_450h_description/launch/lexus_rx_450h_visualisation.launch.py
+++ b/src/urdf/lexus_rx_450h_description/launch/lexus_rx_450h_visualisation.launch.py
@@ -15,9 +15,7 @@ def generate_launch_description():
package='robot_state_publisher',
node_executable='robot_state_publisher',
node_name='robot_state_publisher',
- arguments=[str(urdf_path)]),
+ parameters=[{'robot_description': str(urdf_path)}]),
launch_ros.actions.Node(
package='rviz2',
node_executable='rviz2',
Expected behavior
The observed behaviour should not change.
Definition of Done
-
The robot_state_publisher
node receives the URDF file to load via a parameter.