ami-iit / rod

The ultimate Python tool for RObot Descriptions processing.
https://pypi.org/project/rod/
BSD 3-Clause "New" or "Revised" License
13 stars 3 forks source link

Add Continuous Integration test on parsing URDF models #24

Closed diegoferigo closed 12 months ago

diegoferigo commented 12 months ago

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 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:

The models that do not work will possibly get fixed in the future.

The test runs in two different envs:

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 ```