aligator  0.14.0
A primal-dual augmented Lagrangian-type solver for nonlinear trajectory optimization.
Loading...
Searching...
No Matches
fwd.hpp
Go to the documentation of this file.
1
4#pragma once
5
6#ifdef EIGEN_DEFAULT_IO_FORMAT
7#undef EIGEN_DEFAULT_IO_FORMAT
8#endif
9#define EIGEN_DEFAULT_IO_FORMAT \
10 Eigen::IOFormat(Eigen::StreamPrecision, 0, ",", "\n", "[", "]")
11
12#include "aligator/math.hpp"
14#include "aligator/config.hpp"
15#include "aligator/deprecated.hpp"
16
17#include <memory>
18
19#define ALIGATOR_RAISE_IF_NAN(value) \
20 if (::aligator::math::check_value(value)) \
21 ALIGATOR_RUNTIME_ERROR("Encountered NaN.\n")
22
23#define ALIGATOR_RAISE_IF_NAN_NAME(value, name) \
24 if (::aligator::math::check_value(value)) \
25 ALIGATOR_RUNTIME_ERROR("Encountered NaN for variable {:s}\n", name)
26
27#define ALIGATOR_INLINE inline __attribute__((always_inline))
28
30#if defined(__GNUC__) || defined(__clang__)
31#define ALIGATOR_COMPILER_DIAGNOSTIC_PUSH ALIGATOR_PRAGMA(GCC diagnostic push)
32#define ALIGATOR_COMPILER_DIAGNOSTIC_POP ALIGATOR_PRAGMA(GCC diagnostic pop)
33#if defined(__clang__)
34#define ALIGATOR_COMPILER_DIAGNOSTIC_IGNORED_DELETE_NON_ABSTRACT_NON_VIRTUAL_DTOR
35ALIGATOR_PRAGMA(GCC diagnostic ignored "-Wdelete-non-abstract-non-virtual-dtor")
36#else
37#define ALIGATOR_COMPILER_DIAGNOSTIC_IGNORED_DELETE_NON_ABSTRACT_NON_VIRTUAL_DTOR
38#endif
39#elif defined(WIN32)
40#define ALIGATOR_COMPILER_DIAGNOSTIC_PUSH _Pragma("warning(push)")
41#define ALIGATOR_COMPILER_DIAGNOSTIC_POP _Pragma("warning(pop)")
42#define ALIGATOR_COMPILER_DIAGNOSTIC_IGNORED_DELETE_NON_ABSTRACT_NON_VIRTUAL_DTOR
43#else
44#define ALIGATOR_COMPILER_DIAGNOSTIC_PUSH
45#define ALIGATOR_COMPILER_DIAGNOSTIC_POP
46#define ALIGATOR_COMPILER_DIAGNOSTIC_IGNORED_DEPRECECATED_DECLARATIONS
47#define ALIGATOR_COMPILER_DIAGNOSTIC_IGNORED_VARIADIC_MACROS
48#define ALIGATOR_COMPILER_DIAGNOSTIC_IGNORED_SELF_ASSIGN_OVERLOADED
49#define ALIGATOR_COMPILER_DIAGNOSTIC_IGNORED_MAYBE_UNINITIALIZED
50#endif // __GNUC__ || __clang__
51
52namespace xyz {
53// fwd-decl for boost override later
54template <class T, class A> class polymorphic;
55} // namespace xyz
56
60
62namespace aligator {
63
64template <typename Base, typename U, typename A = std::allocator<U>>
65using is_polymorphic_of = std::is_same<std::decay_t<U>, xyz::polymorphic<U, A>>;
66
67template <typename Base, typename U, typename A = std::allocator<U>>
69
70// NOLINTBEGIN(misc-unused-using-decls)
71
72// fwd ManifoldAbstractTpl
73template <typename Scalar> struct ManifoldAbstractTpl;
74
75// fwd VectorSpaceTpl
76template <typename Scalar, int Dim = Eigen::Dynamic> struct VectorSpaceTpl;
77
78// fwd ConstraintSetTpl
79template <typename Scalar> struct ConstraintSetTpl;
80
82enum VerboseLevel { QUIET = 0, VERBOSE = 1, VERYVERBOSE = 2 };
83
87
88using std::shared_ptr;
89
90// NOLINTEND(misc-unused-using-decls)
91
92// fwd StageFunctionTpl
93template <typename Scalar> struct StageFunctionTpl;
94
95// fwd UnaryFunctionTpl
96template <typename Scalar> struct UnaryFunctionTpl;
97
98// fwd StageFunctionDataTpl
99template <typename Scalar> struct StageFunctionDataTpl;
100
101// fwd CostAbstractTpl
102template <typename Scalar> struct CostAbstractTpl;
103
104// fwd CostDataAbstractTpl
105template <typename Scalar> struct CostDataAbstractTpl;
106
107// fwd DynamicsModelTpl
108template <typename Scalar> struct DynamicsModelTpl;
109
110// fwd DynamicsDataTpl
111template <typename Scalar> struct DynamicsDataTpl;
112
113// fwd StageConstraintTpl
114template <typename Scalar> struct StageConstraintTpl;
115
116// fwd ExplicitDynamicsModelTpl
117template <typename Scalar> struct ExplicitDynamicsModelTpl;
118
119// fwd declaration of ExplicitDynamicsDataTpl
120template <typename Scalar> struct ExplicitDynamicsDataTpl;
121
122/* FUNCTION EXPRESSIONS */
123
124// fwd declaration of FunctionSliceXprTpl
125template <typename Scalar, typename Base> struct FunctionSliceXprTpl;
126
127/* STAGE MODEL */
128
129// fwd StageModelTpl
130template <typename Scalar> struct StageModelTpl;
131
132// fwd StageDataTpl
133template <typename Scalar> struct StageDataTpl;
134
135// fwd CallbackBaseTpl
136template <typename Scalar> struct CallbackBaseTpl;
137
138/* SHOOTING PROBLEM */
139
140// fwd ConstraintStackTpl
141template <typename Scalar> struct ConstraintStackTpl;
142
143// fwd TrajOptProblemTpl
144template <typename Scalar> struct TrajOptProblemTpl;
145
146// fwd TrajOptDataTpl
147template <typename Scalar> struct TrajOptDataTpl;
148
149// fwd SolverProxDDP
150template <typename Scalar> struct SolverProxDDPTpl;
151
152// fwd SolverFDDP
153template <typename Scalar> struct SolverFDDPTpl;
154
155// fwd WorkspaceBaseTpl
156template <typename Scalar> struct WorkspaceBaseTpl;
157
158// fwd ResultsBaseTpl
159template <typename Scalar> struct ResultsBaseTpl;
160
161// fwd WorkspaceTpl
162template <typename Scalar> struct WorkspaceTpl;
163
164// fwd ResultsTpl
165template <typename Scalar> struct ResultsTpl;
166
167// fwd FilterTpl
168template <typename Scalar> struct FilterTpl;
169
170template <typename T>
171using StdVectorEigenAligned ALIGATOR_DEPRECATED_MESSAGE(
172 "Aligator now requires C++17 and the Eigen::aligned_allocator<T> class is "
173 "no longer useful. Please use std::vector<T> instead, this typedef will "
174 "change to be an alias of that of the future, then will be removed.") =
175 std::vector<T, Eigen::aligned_allocator<T>>;
176
177} // namespace aligator
Math utilities.
Main package namespace.
VerboseLevel
Verbosity level.
Definition fwd.hpp:82
@ QUIET
Definition fwd.hpp:82
@ VERYVERBOSE
Definition fwd.hpp:82
@ VERBOSE
Definition fwd.hpp:82
constexpr bool is_polymorphic_of_v
Definition fwd.hpp:68
std::is_same< std::decay_t< U >, xyz::polymorphic< U, A > > is_polymorphic_of
Definition fwd.hpp:65
Definition fwd.hpp:52
Base callback class.
Base constraint set type.
Convenience class to manage a stack of constraints.
A basic filter line-search strategy.
Definition filter.hpp:12
Represents a function of which the output is a subset of another function, for instance where is gi...
Definition fwd.hpp:125
Base class for manifolds, to use in cost funcs, solvers...
Results holder struct.
Definition results.hpp:12
The feasible DDP (FDDP) algorithm, from Mastalli et al. (2020).
A proximal, augmented Lagrangian-type solver for trajectory optimization.
Data struct for stage models StageModelTpl.
A stage in the control problem.
Problem data struct.
Trajectory optimization problem.
Standard Euclidean vector space.
Base workspace struct for the algorithms.
Workspace for solver SolverProxDDP.
Definition workspace.hpp:27