-
Notifications
You must be signed in to change notification settings - Fork 94
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
Error loading meshes from a relative folder for urdf models #227
Comments
Original comment by Diego Ferigo (Bitbucket: dgferigo).
|
Original comment by Louise Poubel (Bitbucket: chapulina, GitHub: chapulina).
That is correct. The URDF is first converted into a string and then passed to the SDF parser, so we lose it's file location on the way. Supporting relative paths inside URDF files would require propagating that file location somehow. |
I have been encountering this issue when trying to load URDF/SDF files. The parser should simply ignore these tags in that case? |
This sounds dangerous; it seems non-trivial to predict what will be lost in the process (it would depend on the model), and silently ignoring tags with paths that can't be resolved may yield very unpredictable and surprising behavior on the user side. Would adding a new attribute called |
Is this fixed by #1213 ? |
Original report (archived issue) by Diego Ferigo (Bitbucket: dgferigo).
Description
If an urdf file has meshes defined with relative path wrt the model file (support introduced in sdformat#558), the meshes are not found.
The setup is the following:
<include><uri>
of the model file (the model’s parent folder is part ofSDF_PATH
). The world file is in an external folder far away from the model / mesh files.meshes
subfolder of the model’s directory).model.config
file in the same folder of the urdf model that loads the urdf with:<sdf>icub.urdf</sdf>
.Opening the world with
ign gazebo /path/to/include_model.world
fails producing errors about meshes not found:However, if I convert the urdf to sdf with
ign sdf -p model.urdf > model.sdf
, and modify themodel.config
to load the sdf, the meshes are found correctly.Versions
I’m on ubuntu 18.04 with sdformat and ign-gazebo compiled from sources.
sdf9@
8ba6c75 (ec4769c)ign-gazebo3@
d42d5baAdditional Information
The meshes folder is not on purpose inside
IGN_FILE_PATH
. If I add the folder to the env variable, meshes are found also in the urdf case (but the main point is that is should work also without this env var).It seems to me that the relative path support for meshes works only if the model is already a sdf model. If, instead, the model is an urdf that needs to be converted, the link to the meshes cannot be resolved. I suspect that, since the conversion happens inside sdformat code, the folder where the original urdf code is located is somehow ignored and it is not included in the search path for meshes.
cc @chapulina
The text was updated successfully, but these errors were encountered: