Support Casadi MX types #2798
philippbrusius
started this conversation in
General
Replies: 1 comment 6 replies
-
|
Good question. Could you use SX in your applications? |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey,
I am using pinocchio.casadi in my code to benefit from AD for my code.
It seems like only cas.SX.sym is supported.
For example:
import pinocchio.casadi as cpin
import casadi as cas
forces = cas.MX.sym("forces", 3, 1)
torques = cas.MX.sym("torques", 3, 1)
cForce = cpin.Force(forces, torques)
will lead to
Traceback (most recent call last):
File "", line 1, in
Boost.Python.ArgumentError: Python argument types in
Force.init(Force, MX, MX)
did not match C++ signature:
init(boost::python::api::object, pinocchio::ForceTpl<double, 0> clone)
init(_object* self, pinocchio::ForceTpl<casadi::Matrixcasadi::SXElem, 0> clone)
init(_object* self, Eigen::Matrix<casadi::Matrixcasadi::SXElem, 6, 1, 0, 6, 1> array)
init(_object* self, Eigen::Matrix<casadi::Matrixcasadi::SXElem, 3, 1, 0, 3, 1> linear, Eigen::Matrix<casadi::Matrixcasadi::SXElem, 3, 1, 0, 3, 1> angular)
init(_object* self)
With SX types this is working.
MX type has quite an advantage, especially for optimal control applications
Is there a special reason for that? Might in the future also MX types be supported?
Thanks in advance for the support
Beta Was this translation helpful? Give feedback.
All reactions