Note that rod has not direct support of URDF, we only support SDF. As a workaround, we expect to find ign sdf|gz sdf installed system-wise, and call sdformat to convert the URDF to SDF before parsing it with rod.
This processing has some side effect. In particular, the URDF model is processed by sdformat and the resulting SDF might differ particularly regarding the lumping logic of links attached through fixed joints.
The test uses iDynTree as ground truth. Similarly, also iDynTree performs link lumping, but it is not 100% compatible with the logic of sdformat. In particular, this PR considers common robot models that work in iDynTree. There are models in which I get the following mismatches:
Sensor frames of some model do not become frames in idyntree and still show as links.
When there's a fixed joint + fake link attached to the base link, idyntree lumps the two base frames keeping a different link than sdformat. Therefore, the considered base frame and the removed link converted to frame are flipped.
The models that do not work will possibly get fixed in the future.
The test runs in two different envs:
Ubuntu 22.04 installing Gazebo Classic from apt and all the rest from PyPI.
Ubuntu, macOS, and Windows installing all dependencies with conda.
On Windows, the gz sdf command line we use for the URDF to SDF conversion does not work for some reason, the pytest suite is disabled on this OS. cc @traversaro
Windows error
```
if cp.returncode != 0:
msg = f"Failed to find 'sdf' command part of {executable} installation"
raise RuntimeError(msg)
RuntimeError: Failed to find 'sdf' command part of C:\Miniconda3\envs\test\Library\bin\gz.BAT installation
```
This PR adds a first test in which
rod
is used to load URDF models from robot-descriptions/robot_descriptions.py and check the read information against robotology/idyntree.Note that
rod
has not direct support of URDF, we only support SDF. As a workaround, we expect to findign sdf|gz sdf
installed system-wise, and callsdformat
to convert the URDF to SDF before parsing it withrod
.This processing has some side effect. In particular, the URDF model is processed by sdformat and the resulting SDF might differ particularly regarding the lumping logic of links attached through fixed joints.
The test uses iDynTree as ground truth. Similarly, also iDynTree performs link lumping, but it is not 100% compatible with the logic of sdformat. In particular, this PR considers common robot models that work in iDynTree. There are models in which I get the following mismatches:
The models that do not work will possibly get fixed in the future.
The test runs in two different envs:
apt
and all the rest from PyPI.conda
.On Windows, the
gz sdf
command line we use for the URDF to SDF conversion does not work for some reason, thepytest
suite is disabled on this OS. cc @traversaroWindows error
``` if cp.returncode != 0: msg = f"Failed to find 'sdf' command part of {executable} installation" raise RuntimeError(msg) RuntimeError: Failed to find 'sdf' command part of C:\Miniconda3\envs\test\Library\bin\gz.BAT installation ```