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
3
#include "
aligator/python/fwd.hpp
"
4
#include "
aligator/modelling/multibody/context.hpp
"
5
#include "
aligator/modelling/multibody/gravity-compensation-residual.hpp
"
6
#include "
aligator/python/polymorphic-convertible.hpp
"
7
8
namespace
aligator::python
{
9
using
context::MatrixXs;
10
using
context::PinModel
;
11
using
context::Scalar
;
12
using
context::StageFunction
;
13
using
context::StageFunctionData
;
14
using
GravityCompensationResidual = GravityCompensationResidualTpl<Scalar>;
15
16
void
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
fwd.hpp
gravity-compensation-residual.hpp
context.hpp
aligator::context::PinModel
pinocchio::ModelTpl< Scalar, Options > PinModel
Definition
context.hpp:9
aligator::context::StageFunction
StageFunctionTpl< Scalar > StageFunction
Definition
context.hpp:16
aligator::context::Scalar
double Scalar
Definition
context.hpp:9
aligator::context::StageFunctionData
StageFunctionDataTpl< Scalar > StageFunctionData
Definition
context.hpp:18
aligator::python
The Python bindings.
Definition
blk-matrix.hpp:5
polymorphic-convertible.hpp
bindings
python
src
modelling
expose-gravity-compensation.cpp
Generated by
1.11.0