duburcqa / jiminy

Jiminy: a fast and portable Python/C++ simulator of poly-articulated robots with OpenAI Gym interface for reinforcement learning
https://duburcqa.github.io/jiminy
MIT License
216 stars 26 forks source link

[core] Leveraging new features introduced by Pinocchio 2.9 #381

Open duburcqa opened 3 years ago

duburcqa commented 3 years ago

It is not straightfoward to use the new optimized algorithms for constraint computation implemented in Pinocchio. The complexity comes from the inability to define custom jacobian for the constraints in Pinocchio:

duburcqa commented 2 years ago

After looking more closely at the implementation of the cholesky decomposition in Pinocchio, it is quite far from the current architecture of Jiminy. Jiminy is providing the whole jacobian as a block matrix, and the connection with individual constraints is already lost at this point.

I suggest adopting the non-aggregated formulation in Jiminy. It would be much easier to take advantage of the sparsity in computations as in Pinocchio, correct PGS bias, and handle friction and non-penetration in solver itself instead of doing confusing index manipulations in PGS itself.

duburcqa commented 2 years ago

Jiminy has been refactored as planned. Now it would be possible to implement the Cholesky decomposition of JMinvJt as proposed in the paper.