aligator
0.12.0
A primal-dual augmented Lagrangian-type solver for nonlinear trajectory optimization.
Loading...
Searching...
No Matches
expose-fly-high.cpp
Go to the documentation of this file.
1
3
#ifdef ALIGATOR_WITH_PINOCCHIO
4
#include "
aligator/modelling/multibody/context.hpp
"
5
6
#include "
aligator/python/fwd.hpp
"
7
#include "
aligator/python/modelling/multibody-utils.hpp
"
8
#include "
aligator/modelling/multibody/fly-high.hpp
"
9
#include "
aligator/python/polymorphic-convertible.hpp
"
10
11
namespace
aligator
{
12
namespace
python
{
13
14
using
context::MultibodyPhaseSpace
;
15
using
context::PinModel
;
16
using
context::Scalar
;
17
using
context::StageFunction
;
18
using
context::StageFunctionData
;
19
using
context::UnaryFunction
;
20
21
void
exposeFlyHigh() {
22
using
FlyHighResidual = FlyHighResidualTpl<Scalar>;
23
PolymorphicMultiBaseVisitor<UnaryFunction, StageFunction>
unary_visitor
;
24
25
bp::class_<FlyHighResidual, bp::bases<UnaryFunction>>(
26
"FlyHighResidual"
,
27
"A residual function :math:`r(x) = v_{j,xy} e^{-s z_j}` where :math:`j` "
28
"is a given frame index."
,
29
bp::no_init)
30
.def(bp::init<
const
int
,
const
PinModel &, pinocchio::FrameIndex,
Scalar
,
31
std::size_t>(
32
(
"self"
_a,
"ndx"
,
"model"
,
"frame_id"
,
"slope"
,
"nu"
)))
33
.def(
FrameAPIVisitor<FlyHighResidual>
())
34
.def(
unary_visitor
)
35
.def_readwrite(
"slope"
, &FlyHighResidual::slope_,
36
"The slope parameter of the function."
);
37
38
bp::class_<FlyHighResidual::Data, bp::bases<StageFunctionData>>(
39
"FlyHighResidualData"
, bp::no_init)
40
.def_readonly(
"ez"
, &FlyHighResidual::Data::ez)
41
.def_readonly(
"pin_data"
, &FlyHighResidual::Data::pdata_);
42
}
43
44
}
// namespace python
45
}
// namespace aligator
46
47
#endif
fwd.hpp
fly-high.hpp
context.hpp
multibody-utils.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::MultibodyPhaseSpace
proxsuite::nlp::MultibodyPhaseSpace< Scalar > MultibodyPhaseSpace
Definition
context.hpp:16
aligator::context::Scalar
double Scalar
Definition
context.hpp:9
aligator::context::UnaryFunction
UnaryFunctionTpl< Scalar > UnaryFunction
Definition
context.hpp:17
aligator::context::StageFunctionData
StageFunctionDataTpl< Scalar > StageFunctionData
Definition
context.hpp:18
aligator::python
The Python bindings.
Definition
blk-matrix.hpp:5
aligator::python::unary_visitor
const PolymorphicMultiBaseVisitor< UnaryFunction, StageFunction > unary_visitor
Definition
expose-function-ops.cpp:20
aligator
Main package namespace.
Definition
action-model-wrap.hpp:14
polymorphic-convertible.hpp
aligator::python::FrameAPIVisitor
Definition
multibody-utils.hpp:12
aligator::python::PolymorphicMultiBaseVisitor
Definition
polymorphic-convertible.hpp:17
bindings
python
src
modelling
expose-fly-high.cpp
Generated by
1.13.2