Open pranshumalik14 opened 2 years ago
This was despite setting the top-level directory to the project folder. Seemed like that information was not passed into the geometry parser/loadstr for the URDF.
The behaviour we should have is that if an abs path is given it should use that, rather than the package relative one.
@pranshumalik14 would that work for you?
Yes absolutely, that should fix it, thank you!
I use os.chdir(os.path.dirname(file)) to solve the problem about absolute path.
https://github.com/olmerg/rtb_serial_robot/blob/main/planar_3dof/Planar3DOF.py
Thanks so much @olmerg! Followed your setup step-by-step and got it to work! But a direct fix for it would still be helpful in general.
Describe the bug Adding new URDF models (that refer to stl files) needs a relative path to the XACRO path in rtbdata.
ValueError: file xacro/stl/braccio_base.stl not found locally or in rtbdata
Any help on how to do this properly will be highly appreciated. Here's a snapshot of the code we have written:
We would like to keep the URDF model information local to our project than to move it to our installation folders. The code that parses xacro files seems to look for geometry files relative to the XACRO directory.
Version information
Did you install it from PyPI or GitHub? Latest Github version (pulled) Commit hash: 51aa8bbb3663a7c815f9880d538d61e7c85bc470
Environment (please complete the following information):