aligator
0.19.0
A versatile and efficient C++ library for real-time constrained trajectory optimization.
Toggle main menu visibility
Loading...
Searching...
No Matches
fwd.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include "
aligator/context.hpp
"
4
5
namespace
boost {
6
template
<
typename
T,
typename
A>
7
inline
T *get_pointer(::xyz::polymorphic<T, A>
const
&x) {
8
const
T *r = x.operator->();
9
return
const_cast<
T *
>
(r);
10
}
11
}
// namespace boost
12
13
#include <eigenpy/eigenpy.hpp>
14
#include <eigenpy/std-vector.hpp>
15
16
#include "
aligator/python/polymorphic.hpp
"
17
19
namespace
aligator::python
{
20
namespace
bp = boost::python;
21
using
eigenpy::StdVectorPythonVisitor;
22
24
inline
bp::arg
operator
""
_a(
const
char
*argname, std::size_t) {
25
return
bp::arg(argname);
26
}
27
28
namespace
internal {
29
30
template
<
typename
ret_type>
31
ret_type suppress_if_void(bp::detail::method_result &&o) {
32
if
constexpr
(!std::is_void_v<ret_type>)
33
return
o.operator ret_type();
34
}
35
36
}
// namespace internal
37
39
void
exposeGAR
();
41
void
exposeFunctions
();
43
void
exposeCosts
();
45
void
exposeConstraint
();
47
void
exposeStage
();
49
void
exposeProblem
();
50
52
void
exposeDynamics
();
54
void
exposeContinuousDynamics
();
56
void
exposeIntegrators
();
57
59
void
exposeSolvers
();
61
void
exposeCallbacks
();
63
void
exposeAutodiff
();
65
void
exposeUtils
();
67
void
exposeFilter
();
68
69
#ifdef ALIGATOR_WITH_PINOCCHIO
70
void
exposePinocchioSpaces
();
71
void
exposePinocchioFunctions
();
72
void
exposePinocchioDynamics
();
73
#endif
74
}
// namespace aligator::python
75
76
#define ALIGATOR_PYTHON_OVERRIDE_IMPL(ret_type, pyname, ...) \
77
do { \
78
if (bp::override fo = this->get_override(pyname)) { \
79
decltype(auto) o = fo(__VA_ARGS__); \
80
return ::aligator::python::internal::suppress_if_void<ret_type>( \
81
std::move(o)); \
82
} \
83
} while (false)
84
90
#define ALIGATOR_PYTHON_OVERRIDE_PURE(ret_type, pyname, ...) \
91
ALIGATOR_PYTHON_OVERRIDE_IMPL(ret_type, pyname, __VA_ARGS__); \
92
ALIGATOR_RUNTIME_ERROR("Tried to call pure virtual function {:s}.", pyname)
93
98
#define ALIGATOR_PYTHON_OVERRIDE(ret_type, cname, fname, ...) \
99
ALIGATOR_PYTHON_OVERRIDE_IMPL(ret_type, #fname, __VA_ARGS__); \
100
return cname::fname(__VA_ARGS__)
context.hpp
aligator::python
The Python bindings.
Definition
blk-matrix.hpp:7
aligator::python::exposeGAR
void exposeGAR()
Expose GAR module.
Definition
expose-gar.cpp:51
aligator::python::exposeConstraint
void exposeConstraint()
Expose constraints.
Definition
expose-constraint.cpp:18
aligator::python::exposeStage
void exposeStage()
Expose StageModel and StageData.
Definition
expose-stage.cpp:31
aligator::python::exposeUtils
void exposeUtils()
Expose utils.
Definition
expose-utils.cpp:8
aligator::python::exposeCosts
void exposeCosts()
Expose cost functions.
Definition
expose-costs.cpp:138
aligator::python::exposeSolvers
void exposeSolvers()
Expose solvers.
Definition
expose-solvers-base.cpp:55
aligator::python::exposeDynamics
void exposeDynamics()
Expose discrete dynamics.
Definition
expose-dynamics.cpp:16
aligator::python::exposeIntegrators
void exposeIntegrators()
Expose numerical integrators.
Definition
expose-integrators.cpp:18
aligator::python::exposePinocchioDynamics
void exposePinocchioDynamics()
Definition
expose-pinocchio-dynamics.cpp:19
aligator::python::exposeCallbacks
void exposeCallbacks()
Expose solver callbacks.
Definition
expose-callbacks.cpp:44
aligator::python::exposePinocchioFunctions
void exposePinocchioFunctions()
Definition
expose-pinocchio-functions.cpp:210
aligator::python::exposeFilter
void exposeFilter()
Expose filter strategy.
Definition
expose-filter.cpp:11
aligator::python::exposeProblem
void exposeProblem()
Expose TrajOptProblem.
Definition
expose-problem.cpp:11
aligator::python::exposeContinuousDynamics
void exposeContinuousDynamics()
Expose continuous dynamics.
Definition
expose-continuous-dynamics.cpp:26
aligator::python::exposeAutodiff
void exposeAutodiff()
Expose autodiff helpers.
Definition
expose-autodiff.cpp:10
aligator::python::exposeFunctions
void exposeFunctions()
Expose stagewise function classes.
Definition
expose-functions.cpp:119
aligator::python::exposePinocchioSpaces
void exposePinocchioSpaces()
Definition
expose-pinocchio-manifolds.cpp:53
polymorphic.hpp
bindings
python
include
aligator
python
fwd.hpp
Generated by
1.17.0