Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incomplete handling of mesh filenames in URDF parsing #442

Open
TJMolnar opened this issue May 21, 2024 · 0 comments · May be fixed by #443
Open

Incomplete handling of mesh filenames in URDF parsing #442

TJMolnar opened this issue May 21, 2024 · 0 comments · May be fixed by #443

Comments

@TJMolnar
Copy link

Paths for mesh filenames in URDF are commonly prefixed with either "package://" or "file://" however urdf.py only handles the former:

def filename(self, value):
global _base_path
if value.startswith("package://"):
value = value.replace("package://", "")
if _base_path is None:
value = rtb_path_to_datafile("xacro", value)
else:
value = _base_path / PurePosixPath(value)
self._filename = str(value)

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

@TJMolnar TJMolnar linked a pull request May 21, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant