ami-iit / adam

adam implements a collection of algorithms for calculating rigid-body dynamics in Jax, CasADi, PyTorch, and Numpy.
https://adam-docs.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
122 stars 18 forks source link

Migrate away from urdf_parser_py? #36

Open traversaro opened 1 year ago

traversaro commented 1 year ago

urdf_parser_py is a bit of a problematic dependency:

At the moment, I was kind of deadlocked w.r.t. to this. Anyhow, yesterday @GiulioRomualdi suggested that we could migrate from urdf_parser_py to another library to load the the URDF. At beginning I was not entusiastic about the idea, but if that would be feasible it would be indeed great. In the following I would list a few alternatives:

Library Pro Cons Notes
Python bindings of iDynTree The ami-iit controls it. It is C++ library with Python bindings, it may be a bit difficult for pure python programmers to understand what's toing on.
yourdfpy Pure python I tought it was mantained, but even this library is not compatible with latest numpy and related PR are not merged: https://github.com/clemense/yourdfpy/pull/46
urdfpy Pure python It has a lot of issue and it is not mantained, this is the library that was used in urdf_modifiers and we are in a similar situation: https://github.com/icub-tech-iit/urdf-modifiers/issues/30#issuecomment-1364040962 . TL;DR: Do not use

Initially I opened this issue noting that yourdfpy could be a well-mantained pure python library that it could make sense to use, but apparently it has mantainance problem as well, so I am deadlocked again. However, it is a bit too late as I already wrote the issue, so let's open the issue, perhaps it may be useful in the future.

GiulioRomualdi commented 1 year ago

Exposing the iDynTree (or Pinocchio) parser? Is it possible?

traversaro commented 1 year ago

Exposing the iDynTree (or Pinocchio) parser? Is it possible?

The iDynTree parser is already exposed, it has the cons listed in the table but the pro that we obtain a rapresentation that is for sure 100% compatible with iDynTree, also w.r.t. to serialization, reduced joitns and similar aspects. However, I am afraid it is a bit more difficult to use than pure python libraries.

Giulero commented 1 year ago

I was with @CarlottaSartore and she told me that another possible parser could be urchin. What's your opinion?

traversaro commented 1 year ago

I was with @CarlottaSartore and she told me that another possible parser could be urchin. What's your opinion?

urchin is based a rebranded version of urdfpy, forked in a repo so that we can do releases (see https://github.com/mmatl/urdfpy/issues/31). Basically it is like urdfpy, but with the advantage that we can publish fixes for it on both PyPI and conda-forge. If you like it, feel free to use it.

traversaro commented 9 months ago

https://github.com/icub-tech-iit/ergocub-gazebo-simulations/issues/49 we were affected by a urdf_parser_py bug (tracked in https://github.com/ros/urdf_parser_py/issues/82).