2#ifdef ALIGATOR_WITH_PINOCCHIO
11void exposeFreeFwdDynamics() {
17 using MultibodyFreeFwdData = MultibodyFreeFwdDataTpl<Scalar>;
18 using MultibodyFreeFwdDynamics = MultibodyFreeFwdDynamicsTpl<Scalar>;
19 using proxsuite::nlp::MultibodyPhaseSpace;
21 using StateManifold = MultibodyPhaseSpace<Scalar>;
23 PolymorphicMultiBaseVisitor<ODEAbstract, ContinuousDynamicsAbstract>
26 bp::class_<MultibodyFreeFwdDynamics, bp::bases<ODEAbstract>>(
27 "MultibodyFreeFwdDynamics",
28 "Free-space forward dynamics on multibodies using Pinocchio's ABA "
30 bp::init<StateManifold, const context::MatrixXs &>(
31 "Constructor where the actuation matrix is provided.",
32 (
"self"_a,
"space",
"actuation_matrix")))
33 .def(bp::init<StateManifold>(
34 "Constructor without actuation matrix (assumed to be the (nu,nu) "
37 .add_property(
"ntau", &MultibodyFreeFwdDynamics::ntau,
40 "isUnderactuated", &MultibodyFreeFwdDynamics::isUnderactuated,
41 "Whether the system is underactuated, i.e. if the actuation matrix "
42 "rank is lower than the acceleration vector's dimension.")
43 .add_property(
"actuationMatrixRank",
44 &MultibodyFreeFwdDynamics::getActuationMatrixRank,
45 "Get the rank of the actuation matrix.")
48 bp::register_ptr_to_python<shared_ptr<MultibodyFreeFwdData>>();
50 bp::class_<MultibodyFreeFwdData, bp::bases<ODEData>>(
"MultibodyFreeFwdData",
52 .def_readwrite(
"tau", &MultibodyFreeFwdData::tau_)
53 .def_readwrite(
"dtau_dx", &MultibodyFreeFwdData::dtau_dx_)
54 .def_readwrite(
"dtau_du", &MultibodyFreeFwdData::dtau_du_)
55 .def_readwrite(
"pin_data", &MultibodyFreeFwdData::pin_data_);
dynamics::ContinuousDynamicsDataTpl< Scalar > ODEData
dynamics::ContinuousDynamicsAbstractTpl< Scalar > ContinuousDynamicsAbstract
dynamics::ODEAbstractTpl< Scalar > ODEAbstract
Namespace for modelling system dynamics.
Continuous dynamics described by differential-algebraic equations (DAEs) .
Data struct for ContinuousDynamicsAbstractTpl.
Base class for ODE dynamics .