stack-of-tasks / pinocchio

A fast and flexible implementation of Rigid Body Dynamics algorithms and their analytical derivatives
http://stack-of-tasks.github.io/pinocchio/
BSD 2-Clause "Simplified" License
1.78k stars 375 forks source link

Derivatives of impulse dynamics #648

Closed nmansard closed 2 years ago

nmansard commented 5 years ago

I need to compute the derivatives of the impulse dynamics, i.e of the function: i(q,dv) = M(q) dv + J(q)^T f I need the derivative of i with respect to q di/dq. i(q,dv) can indeed be computed from rnea: i(q,dv) = rnea(q,v=0,a=dv) when gravity is null, or less efficiently i(q,dv) = rnea(q,v=0,a=dv) - rnea(q,v=0,a=0). I can of course either turn gravity of just before calling drnea, or calling drnea twice with a=dv and a=0. I wonder if somebody would have a better idea?

jcarpent commented 5 years ago

@nmansard I have already implemented these derivatives. I will provide the code asap.

nmansard commented 5 years ago

Ok. I can wait but would need this feature soon. I can surely implement what I described in the top text, from drnea, by removing unecessary terms related to gravity and centrifugal forces, but would certainly prefer that you provide the full impact derivatives if you already have them.

jcarpent commented 5 years ago

I let it open because it is a requested feature.

jcarpent commented 5 years ago

By the way, you can do better than you suggest for getting the impulse dynamics. I will provide it soon.

proyan commented 5 years ago

Hi Justin, Is there any activity on this issue? Could you please let me know if the derivatives might be released soon? Thanks

jcarpent commented 2 years ago

Done in pinocchio-3x which should be released soon.