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

Add way to call ccrba from RobotWrapper #1110

Closed jviereck closed 4 years ago

jviereck commented 4 years ago

In Pinocchio 2.2.2, calling

robot.centroidalMomentum(q, dq)

fills the robot.data.Ag entries. Having version 2.3.1 installed it's necessary to call

se3.ccrba(self.robot.model, self.robot.data, q, dq)

It would be great if there would be a call like robot.computeCentroidalMomentumMatrix(q, dq) or similar on the RobotWrapper.

jcarpent commented 4 years ago

Yes, sure. Then the API could be simply: robot.computeCentroidalMomentumMatrix(q) and we may also add something like: robot.computeCentroidalQuantities(q,v) or maybe a better name would be expected here, to call the ccrba.

gabrielebndn commented 4 years ago

Why not simply robot.ccrba? I don't see the point of having a name which does not resemble at all the one of the normal API

jviereck commented 4 years ago

ccrba is an algorithm. The other robot. method are also rather descriptive, like robot.mass instead of robot.crba. That's why I proposed the name computeCentroidalMomentumMatrix.

jcarpent commented 4 years ago

@jviereck I would just remove compute to mimic the current API of RobotWrapper ;)

jcarpent commented 4 years ago

Solved by #1111.

jviereck commented 4 years ago

Thanks for the quick fix @jcarpent !