6template <
typename T,
typename A>
7inline T *get_pointer(::xyz::polymorphic<T, A>
const &x) {
8 const T *r = x.operator->();
9 return const_cast<T *
>(r);
13#include <eigenpy/eigenpy.hpp>
14#include <eigenpy/std-vector.hpp>
20namespace bp = boost::python;
21using eigenpy::StdVectorPythonVisitor;
24inline bp::arg
operator""_a(
const char *argname, std::size_t) {
25 return bp::arg(argname);
30template <
typename ret_type>
31ret_type suppress_if_void(bp::detail::method_result &&o) {
32 if constexpr (!std::is_void_v<ret_type>)
33 return o.operator ret_type();
69#ifdef ALIGATOR_WITH_PINOCCHIO
76#define ALIGATOR_PYTHON_OVERRIDE_IMPL(ret_type, pyname, ...) \
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>( \
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)
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__)
void exposeGAR()
Expose GAR module.
void exposeConstraint()
Expose constraints.
void exposeStage()
Expose StageModel and StageData.
void exposeUtils()
Expose utils.
void exposeCosts()
Expose cost functions.
void exposeSolvers()
Expose solvers.
void exposeDynamics()
Expose discrete dynamics.
void exposeIntegrators()
Expose numerical integrators.
void exposePinocchioDynamics()
void exposeCallbacks()
Expose solver callbacks.
void exposePinocchioFunctions()
void exposeFilter()
Expose filter strategy.
void exposeProblem()
Expose TrajOptProblem.
void exposeContinuousDynamics()
Expose continuous dynamics.
void exposeAutodiff()
Expose autodiff helpers.
void exposeFunctions()
Expose stagewise function classes.
void exposePinocchioSpaces()