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

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

Open
duburcqa opened this issue Jul 14, 2021 · 2 comments
Open

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

duburcqa opened this issue Jul 14, 2021 · 2 comments
Labels
core enhancement New feature or request P2 Low priority issue physics

Comments

@duburcqa
Copy link
Owner

duburcqa commented Jul 14, 2021

  • aba now computes the acceleration and forces, no need to do it manually anymore when there is no constraint
  • armature are taking into account into algorithms, through model.armature. No need to overload pinocchio anymore.
  • RigidContraintModel and RigidContraintData are now provided to handle fixed frame constraints.

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:

  • First approach [Try hard to use provided algorithm]
    The easiest way to get around this limitation is to abuse the data.J (which is the concatenation in column of the joint jacobian in world frame) by swapping the memory with the constraint Jacobian computed by Jiminy. Then, each constraint would feature an extra attributes corresponding to the associated RigidContraintModel and RigidContraintData, always assuming 6 fixed DoFs in WORLD frame whatever the actual reference frame. Jiminy Model would provide new methods getConstraintModel and getConstraintData to get the ordered vectors of RigidContraintModel and RigidContraintData attributes for all active constraints respectively. This way, it is not necessary to modify the core algorithms of Pinocchio. However, it would add empty rows in the jacobian, that may break the algorithm.
  • Second apporach [Reimplement the sparse decomposition algorithm]
    The main issue would be code duplication.
@duburcqa duburcqa changed the title [core] Take advantage of the new features introduced by Pinocchio 2.9 [core] Leveraging the new features introduced by Pinocchio 2.9 Aug 18, 2021
@duburcqa duburcqa changed the title [core] Leveraging the new features introduced by Pinocchio 2.9 [core] Leveraging new features introduced by Pinocchio 2.9 Aug 18, 2021
@duburcqa duburcqa added the core label Oct 16, 2021
@duburcqa duburcqa added enhancement New feature or request P2 Low priority issue labels Nov 12, 2021
@duburcqa duburcqa added P0 Highest priority issue and removed P2 Low priority issue labels Apr 2, 2022
@duburcqa
Copy link
Owner Author

duburcqa commented Apr 2, 2022

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
Copy link
Owner Author

duburcqa commented Apr 6, 2022

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

@duburcqa duburcqa added P1 Mid priority issue physics and removed P0 Highest priority issue labels May 1, 2022
@duburcqa duburcqa added P2 Low priority issue and removed P1 Mid priority issue labels Aug 10, 2023
@duburcqa duburcqa moved this to To do in Jiminy 2.0 Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core enhancement New feature or request P2 Low priority issue physics
Projects
Status: To do
Development

No branches or pull requests

1 participant