I encountered an issue where executing the following command: ros2 param get /robot_state_publisher robot_description
returns absolute file paths (file:///home/...) instead of the originally defined package:// paths in the URDF.
For example, in my URDF, I define a mesh file like this: <mesh filename="package://go2_description/meshes/calf.dae" scale="1 1 1"/>
However, when I retrieve the robot_description parameter, it appears as: <mesh filename="file:///home/go2_ws/install/go2_description/share/go2_description/meshes/calf.dae" scale="1 1 1"/>
This conversion makes it difficult to maintain portability across different environments and makes it inconsistent with how resources are typically referenced in ROS 2.
How can I use package:// paths instead of absolute paths?
I encountered an issue where executing the following command:
ros2 param get /robot_state_publisher robot_descriptionreturns absolute file paths (file:///home/...) instead of the originally defined package:// paths in the URDF.
For example, in my URDF, I define a mesh file like this:
<mesh filename="package://go2_description/meshes/calf.dae" scale="1 1 1"/>However, when I retrieve the robot_description parameter, it appears as:
<mesh filename="file:///home/go2_ws/install/go2_description/share/go2_description/meshes/calf.dae" scale="1 1 1"/>This conversion makes it difficult to maintain portability across different environments and makes it inconsistent with how resources are typically referenced in ROS 2.
How can I use package:// paths instead of absolute paths?