You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
elifhasElement(geometryElement, 'mesh'):
meshfile=geometryElement.getElementsByTagName('mesh')[0].getAttribute('filename')
# hack for gazebo mesh databaseifmeshfile.count('package'):
idx0=meshfile.find('package://')
meshfile=meshfile[idx0+len('package://'):]
ifmeshfile.count('file'):
idx0=meshfile.find('file://')
meshfile=meshfile[idx0+len('file://'):]
ifnotos.path.isabs(meshfile):
# Use the path relative to the output filemeshfile=os.path.normpath(os.path.relpath(os.path.join(path, meshfile), outputDirectory))
The text was updated successfully, but these errors were encountered:
IDavGal
changed the title
Missing parsing of gazebo mesh filename 'file://' prefix
Missing parsing of ROS mesh filename 'file://' prefix
May 31, 2023
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:The text was updated successfully, but these errors were encountered: