jrl-umi3218 / RBDyn

RBDyn provides a set of classes and functions to model the dynamics of rigid body systems.
BSD 2-Clause "Simplified" License
157 stars 47 forks source link

[export] Ensure that filenames are prefixed by file:// or package:// #90

Closed arntanguy closed 2 years ago

arntanguy commented 2 years ago

This PR ensures that filenames in the urdf/yaml obtained by to_urdf/to_yaml are always prefixed by either file:// or package://. This is a requirement for a lot of ROS tools (such as rviz).

For example the following cannot be displayed in rviz

<mesh filename="/usr/local/share/panda_prosthesis/meshes/support_femur.stl" scale="0.001 0.001 0.001"/>

but with the file:// prefix everything is fine.

<mesh filename="file:///usr/local/share/panda_prosthesis/meshes/support_femur.stl" scale="0.001 0.001 0.001"/>

Note that this assumes that in case no valid prefix is provided that the intent was to load a local file.