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

[export] Ensure that filenames are prefixed by file:// or package:// #90

Merged
merged 3 commits into from
Oct 8, 2021

Conversation

arntanguy
Copy link
Contributor

This PR ensures that filenames in the urdf/yaml obtained by to_urdf/to_yaml are always prefixed by either file:// or package://. This is a requirement for a lot of ROS tools (such as rviz).

For example the following cannot be displayed in rviz

<mesh filename="/usr/local/share/panda_prosthesis/meshes/support_femur.stl" scale="0.001 0.001 0.001"/>

but with the file:// prefix everything is fine.

<mesh filename="file:///usr/local/share/panda_prosthesis/meshes/support_femur.stl" scale="0.001 0.001 0.001"/>

Note that this assumes that in case no valid prefix is provided that the intent was to load a local file.

Copy link
Member

@gergondet gergondet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok.

You need to update the reference URDF used in the tests: https://github.com/jrl-umi3218/RBDyn/blob/master/tests/ParsersTestUtils.h#L220

@gergondet gergondet force-pushed the topic/FilenamePrefix branch from ae33fbc to d27d677 Compare October 8, 2021 04:45
@gergondet gergondet merged commit 31c4ee9 into jrl-umi3218:master Oct 8, 2021
@arntanguy arntanguy deleted the topic/FilenamePrefix branch October 27, 2021 11:44
gergondet added a commit that referenced this pull request Jul 25, 2022
- Always generate URIs in the URDF (#90)
- Honor GNU install dirs (#91)
- Fix tests on aarch64 (#92)
- Improve numerical integration for free-flyer and spherical joints (#66)
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 this pull request may close these issues.

2 participants