How to ensure the result satisfies manifold structure when calculating partial derivatives with CppAD? #2583
-
When using CppAD to calculate the partial derivative of a variable with respect to For example, when I use CppAD to calculate the partial derivatives of However, the analytical derivatives of pinocchio I want to obtain the same result as pinocchio's analytical derivatives using CppAD. In Pinocchio's example, only I'd appreciate it if you could provide some ideas! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I've noticed that the tangent space matrix might be of some help. The tangent space matrix Does Pinocchio provide some function for calculating the tangent matrices? |
Beta Was this translation helpful? Give feedback.
Hello @Zionshang !
There is a similar issue with CasADi where differentiating an expression by the configuration vector
q
results (for non-Euclidean configuration spaces, e.g. those with floating bases for quadrupeds, bipeds, quadrotors...) in a Jacobian that has the wrong dimensions.What we usually do for CasADi and CppAD is write the expression using another, dependent expression$\tilde{q} = q_0 \oplus \mathrm{\delta q}$ where $\mathrm{\delta q} \in \mathbf{R}^{n_v}$ is gonna be the (Euclidean space) variable with respect to which we differentiate (and evaluate the derivative at $\delta\mathrm{q} = 0$ ). What we get then is