aligator
0.19.0
A versatile and efficient C++ library for real-time constrained trajectory optimization.
Toggle main menu visibility
Loading...
Searching...
No Matches
expose-filter.cpp
Go to the documentation of this file.
1
3
#include "
aligator/python/fwd.hpp
"
4
5
#include "
aligator/core/filter.hpp
"
6
#include <eigenpy/std-pair.hpp>
7
8
namespace
aligator
{
9
namespace
python
{
10
11
void
exposeFilter
() {
12
using
Filter =
FilterTpl<double>
;
13
14
eigenpy::StdPairConverter<std::pair<double, double>>::registration();
15
StdVectorPythonVisitor<std::vector<std::pair<double, double>>,
true
>::expose(
16
"StdVec_StdPair_double"
);
17
18
bp::register_ptr_to_python<shared_ptr<Filter>>();
19
bp::class_<Filter>(
"Filter"
,
20
"A pair filter implementation to help make larger steps "
21
"during optimization."
,
22
bp::init<double, double, std::size_t>(bp::args(
23
"self"
,
"beta"
,
"alpha_min"
,
"max_num_steps"
)))
24
.def(
"resetFilter"
, &Filter::resetFilter,
25
bp::args(
"self"
,
"beta"
,
"alpha_min"
,
"max_num_steps"
),
26
"Reset the filter parameters."
)
27
.def(
"run"
, &Filter::run, bp::args(
"self"
,
"phi"
,
"alpha_try"
),
28
"Make a step and add pair if step accepted."
)
29
.def(
"accept_pair"
, &Filter::accept_pair, bp::args(
"self"
,
"fpair"
),
30
"Pair acceptance function."
)
31
.def_readwrite(
"beta"
, &Filter::beta_,
32
"Distance parameter with other pairs in filter."
)
33
.def_readwrite(
"alpha_min"
, &Filter::alpha_min_,
"Minimum alpha step."
)
34
.def_readonly(
"filter_pairs_"
, &Filter::filter_pairs_,
35
"Filter pairs vector."
);
36
}
37
38
}
// namespace python
39
}
// namespace aligator
fwd.hpp
filter.hpp
aligator::python
The Python bindings.
Definition
blk-matrix.hpp:7
aligator::python::exposeFilter
void exposeFilter()
Expose filter strategy.
Definition
expose-filter.cpp:11
aligator
Main package namespace.
Definition
action-model-wrap.hpp:14
aligator::FilterTpl
A basic filter line-search strategy.
Definition
filter.hpp:12
bindings
python
src
expose-filter.cpp
Generated by
1.17.0