aligator  0.10.0
A primal-dual augmented Lagrangian-type solver for nonlinear trajectory optimization.
Loading...
Searching...
No Matches
expose-gravity-compensation.cpp
Go to the documentation of this file.
1
2#ifdef ALIGATOR_WITH_PINOCCHIO
7
8namespace aligator::python {
9using context::MatrixXs;
11using context::Scalar;
14using GravityCompensationResidual = GravityCompensationResidualTpl<Scalar>;
15
16void exposeGravityCompensation() {
17 bp::class_<GravityCompensationResidual, bp::bases<StageFunction>>(
18 "GravityCompensationResidual", bp::no_init)
19 .def(bp::init<int, const MatrixXs &, const PinModel &>(
20 ("self"_a, "ndx", "actuation_matrix", "model")))
21 .def(bp::init<int, const PinModel &>(("self"_a, "ndx", "model")))
22 .def_readonly("pin_model", &GravityCompensationResidual::pin_model_)
23 .def_readonly("actuation_matrix",
24 &GravityCompensationResidual::actuation_matrix_)
25 .def_readonly("use_actuation_matrix",
26 &GravityCompensationResidual::use_actuation_matrix)
27 .def(PolymorphicMultiBaseVisitor<StageFunction>());
28
29 bp::class_<GravityCompensationResidual::Data, bp::bases<StageFunctionData>>(
30 "GravityCompensationData", bp::no_init)
31 .def_readonly("pin_data", &GravityCompensationResidual::Data::pin_data_);
32}
33
34} // namespace aligator::python
35#endif
pinocchio::ModelTpl< Scalar, Options > PinModel
Definition context.hpp:9
StageFunctionTpl< Scalar > StageFunction
Definition context.hpp:16
StageFunctionDataTpl< Scalar > StageFunctionData
Definition context.hpp:18
The Python bindings.
Definition blk-matrix.hpp:5