The file:// prefix is not being parsed out of the mesh filename in the URDF definition.
I'm thinking this can be fixed by modifying the code in parserURDF.py in a similar manner to how the package:// prefix is addressed there, although both checks should be done before the absolute path checking, since filenames with any of these prefixes would be categorized as relative paths and therefore be affected by the os.path.normpath() method, collapsing all consecutive backslashes into a single one. The modified code would look like this:
elif hasElement(geometryElement, 'mesh'):
meshfile = geometryElement.getElementsByTagName('mesh')[0].getAttribute('filename')
# hack for gazebo mesh database
if meshfile.count('package'):
idx0 = meshfile.find('package://')
meshfile = meshfile[idx0 + len('package://'):]
if meshfile.count('file'):
idx0 = meshfile.find('file://')
meshfile = meshfile[idx0 + len('file://'):]
if not os.path.isabs(meshfile):
# Use the path relative to the output file
meshfile = os.path.normpath(os.path.relpath(os.path.join(path, meshfile), outputDirectory))
The
file://
prefix is not being parsed out of the mesh filename in the URDF definition.I'm thinking this can be fixed by modifying the code in parserURDF.py in a similar manner to how the
package://
prefix is addressed there, although both checks should be done before the absolute path checking, since filenames with any of these prefixes would be categorized as relative paths and therefore be affected by theos.path.normpath()
method, collapsing all consecutive backslashes into a single one. The modified code would look like this: