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
123 stars 19 forks source link

Fix link filtering #85

Closed Giulero closed 3 months ago

Giulero commented 3 months ago

This PR fixes #82. The link filtering was done by selecting the links with inertia (and frames without inertia; see https://github.com/ami-iit/adam/pull/83#issuecomment-2157581130).

With this fix, massless links with children are also considered connecting links, and the tree is not broken.

Giulero commented 3 months ago

The parametric interface is failing. I'm gonna fix it

Giulero commented 3 months ago

Parametric interface fixed. I've also added the additional check https://github.com/ami-iit/adam/pull/83#issuecomment-2162615275

Namely, citing idyntree:

/**
 * The condition for a link to be classified as "fake link" are:
 *  * The link has a zero mass.
 *  * The link is a leaf, i.e. it is connected to only one neighbor.
 *  * The link is connected to its only neighbor with a fixed joint.
 */
Giulero commented 3 months ago

Thanks guys! :) Merging.