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

Add Continuous Integration test on parsing URDF models #24

Merged
merged 4 commits into from
Jul 13, 2023
Merged

Conversation

diegoferigo
Copy link
Member

@diegoferigo diegoferigo commented Jul 13, 2023

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:

  • 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

@diegoferigo diegoferigo self-assigned this Jul 13, 2023
@diegoferigo diegoferigo requested a review from traversaro July 13, 2023 15:25
@diegoferigo diegoferigo merged commit f229b82 into main Jul 13, 2023
@diegoferigo diegoferigo deleted the feature/ci branch July 13, 2023 15:58
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