Closed robinhhood closed 1 month ago
Hi @robinhhood,
a good starting point to see how to use CasADi and Pinocchio together in C++ are the unittest, for example this one.
Everything is templated on the scalar type (Model, algorithms etc), so instead of using double
(which is the default) you use casadi::SX
.
@robinhhood I've just opened this PR (#2388) that provides two new C++ examples related to the use of RNEA and ABA with CasADi
@fabinsch thank you for the hint @jcarpent thank you for the example
Hello all!
Thank you in advance for your time!
I have Python 3.8 on my Ubuntu 20.04 installed and I built:
I have successfully tested RNEA and ABA in Python using the following code:
However, I am normally working with C++ and therefore I want to translate this code to C++ and I am unsure how to proceed. Specifically, I would like to know the following:
What is the 1:1 C++ equivalent of the Python import statement
from pinocchio import casadi as cpin
? Is there a similar namespace or module in C++? I am a little bit confused since this casadi comes from the path: /usr/local/lib/python3.8/site-packages/pinocchio/casadiWhich headers should I include to work with CasADi and Pinocchio together in C++? Did I miss something like
#include <pinocchio/casadi.hpp>
? I’m looking for the equivalent functions likepinocchio::casadi::rnea
orpinocchio::casadi::aba
. It seems that the following headers are not enough:Are there examples available demonstrating how to implement RNEA and ABA with CasADi in C++?
I appreciate any help how to work with CasADi in Pinocchio on the C++ side.