7template <
typename T,
typename A>
9 const T *r = x.operator->();
10 return const_cast<T *
>(r);
14#include <eigenpy/eigenpy.hpp>
15#include <eigenpy/std-vector.hpp>
21namespace bp = boost::python;
22using eigenpy::StdVectorPythonVisitor;
25inline bp::arg
operator""_a(
const char *argname, std::size_t) {
26 return bp::arg(argname);
31template <
typename ret_type>
32ret_type suppress_if_void(bp::detail::method_result &&o) {
33 if constexpr (!std::is_void_v<ret_type>)
34 return o.operator ret_type();
70#ifdef ALIGATOR_WITH_PINOCCHIO
72void exposePinocchioFeatures();
77#define ALIGATOR_PYTHON_OVERRIDE_IMPL(ret_type, pyname, ...) \
79 if (bp::override fo = this->get_override(pyname)) { \
80 decltype(auto) o = fo(__VA_ARGS__); \
81 return ::aligator::python::internal::suppress_if_void<ret_type>( \
91#define ALIGATOR_PYTHON_OVERRIDE_PURE(ret_type, pyname, ...) \
92 ALIGATOR_PYTHON_OVERRIDE_IMPL(ret_type, pyname, __VA_ARGS__); \
93 ALIGATOR_RUNTIME_ERROR("Tried to call pure virtual function {:s}.", pyname)
99#define ALIGATOR_PYTHON_OVERRIDE(ret_type, cname, fname, ...) \
100 ALIGATOR_PYTHON_OVERRIDE_IMPL(ret_type, #fname, __VA_ARGS__); \
101 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 exposeCallbacks()
Expose solver callbacks.
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.
T * get_pointer(::xyz::polymorphic< T, A > const &x)