idyntree icon indicating copy to clipboard operation
idyntree copied to clipboard

Implement algorithm to compute the C Coriolis Matrix such that dotM = C + C^T

Open traversaro opened this issue 5 years ago • 9 comments
trafficstars

It is useful to compute the Coriolis matrix in a numerical efficient manner. Two initial references are :

For reference, the code to compute the mass matrix (for floating base systems, and using the left-trivialized base velocity) is:

  • https://github.com/robotology/idyntree/blob/d5bbceab9e8ae52943b31199f6e024d12ff52159/src/model/src/Dynamics.cpp#L149 The resulting matrix is then processed in https://github.com/robotology/idyntree/blob/d5bbceab9e8ae52943b31199f6e024d12ff52159/src/high-level/src/KinDynComputations.cpp#L1816 to support also the possibility to express the base velocity as right-trivialized or mixed convention (that is the default that we typically use). This code basically implements the CRBA algorithm you can find in Featherstone RBDA book, but adapted for floating base systems.

traversaro avatar Oct 09 '20 09:10 traversaro

cc @singhbal-baljinder @robotology/iit-dynamic-interaction-control

traversaro avatar Oct 09 '20 09:10 traversaro

Apparently an algorithm similar to the one published in Numerical Methods to Compute the CoriolisMatrix and Christoffel Symbols for Rigid-BodySystems. was added in Pinocchio 3 years ago in https://github.com/stack-of-tasks/pinocchio/commit/69ccceac97ebd34722723d3c753d359783e33c93, but I am not sure if that one was implemented from some kind of written reference, perhaps @jcarpent has some reference for that.

traversaro avatar Oct 09 '20 09:10 traversaro

If you want, this feature is already implemented in Pinocchio: https://github.com/stack-of-tasks/pinocchio/blob/820d0f85fbabddce20924a6e0f781fb2be5029e9/src/algorithm/rnea.hpp#L152. I did that for the analytical derivatives at the beginning ;)

jcarpent avatar Oct 09 '20 10:10 jcarpent

Oh, amazing, we had the same thoughts. I don't have any reference, but I may write a technical note if you want.

jcarpent avatar Oct 09 '20 10:10 jcarpent

Oh, amazing, we had the same thoughts. I don't have any reference, but I may write a technical note if you want.

Thanks @jcarpent for the quick reply! Don't worry, I think the code is enough as a reference. Writing it down with proper notation may be a perfect exercise for some of our students. : )

traversaro avatar Oct 09 '20 10:10 traversaro

Cool!

jcarpent avatar Oct 09 '20 10:10 jcarpent

I can try to tackle the problem, however I think I need a short meeting with @traversaro to better discuss the possible approaches

GiulioRomualdi avatar Nov 07 '21 11:11 GiulioRomualdi

Sure, let's schedule it when you prefer using the Teams' scheduling helper.

traversaro avatar Nov 07 '21 17:11 traversaro