41 using PolyExplicitDynamics = xyz::polymorphic<ExplicitDynamics>;
42 StdVectorPythonVisitor<std::vector<PolyExplicitDynamics>,
true>::expose(
43 "StdVec_ExplicitDynamics",
44 eigenpy::details::overload_base_get_item_for_std_vector<
45 std::vector<PolyExplicitDynamics>>{});
47 register_polymorphic_to_python<PolyExplicitDynamics>();
49 bp::class_<PyExplicitDynamics<>, bp::bases<DynamicsModel>,
51 "ExplicitDynamicsModel",
"Base class for explicit dynamics.",
52 bp::init<const PolyManifold &, const int>(
53 "Constructor with state space and control dimension.",
54 (
"self"_a,
"space",
"nu")))
55 .def(
"forward", bp::pure_virtual(&ExplicitDynamics::forward),
56 (
"self"_a,
"x",
"u",
"data"),
"Call for forward discrete dynamics.")
57 .def(
"dForward", bp::pure_virtual(&ExplicitDynamics::dForward),
58 (
"self"_a,
"x",
"u",
"data"),
59 "Compute the derivatives of forward discrete dynamics.")
64 bp::register_ptr_to_python<shared_ptr<ExplicitDynamicsData>>();
66 bp::class_<ExplicitDataWrapper, bp::bases<DynamicsData>, boost::noncopyable>(
67 "ExplicitDynamicsData",
"Data struct for explicit dynamics models.",
68 bp::init<int, int, int, int>((
"self"_a,
"ndx1",
"nu",
"nx2",
"ndx2")))
71 bp::make_getter(&ExplicitDynamicsData::xnext_ref,
72 bp::return_value_policy<bp::return_by_value>()))
74 "dx", bp::make_getter(&ExplicitDynamicsData::dx_ref,
75 bp::return_value_policy<bp::return_by_value>()))
DynamicsModelTpl< Scalar > DynamicsModel
ExplicitDynamicsModelTpl< Scalar > ExplicitDynamics
DynamicsDataTpl< Scalar > DynamicsData
ExplicitDynamicsDataTpl< Scalar > ExplicitDynamicsData