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

URDF Exporter URI support #798

Open
marip8 opened this issue Jul 8, 2022 · 3 comments
Open

URDF Exporter URI support #798

marip8 opened this issue Jul 8, 2022 · 3 comments

Comments

@marip8
Copy link
Contributor

marip8 commented Jul 8, 2022

It looks like the URDF writing capabilities of tesseract_urdf assume that all geometry is referenced with the package:// URI in the output URDF. This is not necessarily always the case, especially with non-ROS projects that use tesseract to generate a URDF model. Has there been any thought behind supporting other URIs, specifically file://?

@Levi-Armstrong
Copy link
Contributor

The default resource locators support this so it makes sense that they would support it also.

@JeremyZoss
Copy link

So what does that argument to the export method look like? An enumeration of the possible export types? An export_uri_prefix string that gets prepended to the mesh file locations? Do we actively try to write the files to the location specified by the resource prefix, or do we always write the geometry to the same place and assume the user specifies the right prefix for where they plan to place the files?

It looks like the default locator uses libcurl for imports, and supports many formats: http, ftp, file, package, etc. The full libcurl format list is pretty extensive. You could maybe wrap libcurl to copy the files to the specified location. If we're only prepending a user-provided resource location prefix (not actually copying files to the specified location), then this is not really an issue.

Also note that it seems like file:// URIs always expect absolute paths (not relative paths). So I'm not sure if there's a good portable method to replace the standard package-relative resource reference with something less ROS-centric.

@Levi-Armstrong
Copy link
Contributor

Maybe we create a base class called ResourceExporter with a virtual method given a file name generates a URI. Then all of the write methods in tesseract_urdf take this instead of package_path and file name. This way the developer could implement there own way of generating URI using file://, package, etc.

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

No branches or pull requests

3 participants