robotics-toolbox-python
robotics-toolbox-python copied to clipboard
Incomplete handling of mesh filenames in URDF parsing
Paths for mesh filenames in URDF are commonly prefixed with either "package://" or "file://" however urdf.py only handles the former:
https://github.com/petercorke/robotics-toolbox-python/blob/7f1bcae7e17360ea9b30a49731c2c93a219c6a19/roboticstoolbox/tools/urdf/urdf.py#L299-L311
This results in filenames with the second prefix, e.g:
<mesh filename="file:///opt/ros/humble/share/kortex_description/arms/gen3/7dof/meshes/base_link.STL"/>
To be passed directly to rtb_path_to_datafile without sanitising, which results in the file not being found. This should be simple to fix by adding a check for the file:// prefix alongside the existing package:// one