aligator  0.14.0
A primal-dual augmented Lagrangian-type solver for nonlinear trajectory optimization.
Loading...
Searching...
No Matches
aligator Namespace Reference

Main package namespace. More...

Namespaces

namespace  autodiff
 
namespace  compat
 Headers for compatibility modules.
 
namespace  context
 
namespace  detail
 
namespace  dynamics
 Namespace for modelling system dynamics.
 
namespace  gar
 
namespace  math
 Math utilities.
 
namespace  omp
 Utilities to set parallelism options.
 
namespace  python
 The Python bindings.
 
namespace  utils
 

Classes

struct  AngularAccelerationDataTpl
 
struct  AngularAccelerationResidualTpl
 This residual returns the angular acceleration of a centroidal model with state \(x = (c, h, L) \), computed from the external forces and contact poses. More...
 
struct  AngularMomentumDataTpl
 
struct  AngularMomentumResidualTpl
 This residual returns the angular momentum for a centroidal model with state \(x = (c, h, L) \). More...
 
class  ArmijoLinesearch
 Basic backtracking Armijo line-search strategy. More...
 
class  BlkMatrix
 Block matrix class, with a fixed-size number of row and column blocks. More...
 
struct  BoxConstraintTpl
 Box constraint set \(z \in [z_\min, z_\max]\). More...
 
struct  BunchKaufman
 
struct  CallbackBaseTpl
 Base callback class. More...
 
struct  CartesianProductTpl
 The cartesian product of two or more manifolds. More...
 
struct  CenterOfMassTranslationDataTpl
 
struct  CenterOfMassTranslationResidualTpl
 This residual returns the Center of Mass translation for a centroidal model with state \(x = (c, h, L) \). More...
 
struct  CenterOfMassVelocityDataTpl
 
struct  CenterOfMassVelocityResidualTpl
 
struct  CentroidalAccelerationDataTpl
 
struct  CentroidalAccelerationResidualTpl
 This residual returns the linear acceleration of a centroidal model with state \(x = (c, h, L) \), computed from the external forces and contact poses. More...
 
struct  CentroidalCoMDataTpl
 
struct  CentroidalCoMResidualTpl
 
struct  CentroidalFrictionConeDataTpl
 This residual implements the "ice cream" friction cone for a centroidal model with state \(x = (c, h, L) \). More...
 
struct  CentroidalFrictionConeResidualTpl
 
struct  CentroidalMomentumDataTpl
 
struct  CentroidalMomentumDerivativeDataTpl
 
struct  CentroidalMomentumDerivativeResidualTpl
 This residual returns the derivative of centroidal momentum for a kinodynamics model. More...
 
struct  CentroidalMomentumResidualTpl
 This residual returns the derivative of centroidal momentum for a kinodynamics model. More...
 
struct  CentroidalWrapperDataTpl
 
struct  CentroidalWrapperResidualTpl
 This residual acts as a wrapper for centroidal model cost functions in which the external forces are added to the state and the control becomes the forces derivatives. More...
 
struct  CentroidalWrenchConeDataTpl
 This residual implements the wrench cone for a centroidal model with control \(u = (f_1,...,f_c) \) with \(f_k\) 6D spatial force. More...
 
struct  CentroidalWrenchConeResidualTpl
 
struct  CompositeCostDataTpl
 Data struct for composite costs. More...
 
struct  ConstantCostTpl
 Constant cost. More...
 
class  ConstraintProximalScalerTpl
 
struct  ConstraintSetProductTpl
 Cartesian product of multiple constraint sets. This class makes computing multipliers and Jacobian matrix projections more convenient. More...
 
struct  ConstraintSetTpl
 Base constraint set type. More...
 
struct  ConstraintStackTpl
 Convenience class to manage a stack of constraints. More...
 
struct  ContactForceDataTpl
 
struct  ContactForceResidualTpl
 This residual returns the derivative of centroidal momentum for a kinodynamics model. More...
 
struct  ContactMapTpl
 Contact map for centroidal costs and dynamics. More...
 
struct  ControlBoxFunctionTpl
 A simple function \(f(u) = [u_{\min} - u; u - u_{\max}]\). More...
 
struct  ControlErrorResidualTpl
 
struct  CostAbstractTpl
 Stage costs \( \ell(x, u) \) for control problems. More...
 
struct  CostDataAbstractTpl
 Data struct for CostAbstractTpl. More...
 
struct  CostStackDataTpl
 
struct  CostStackTpl
 Weighted sum of multiple cost components. More...
 
struct  DCMPositionDataTpl
 
struct  DCMPositionResidualTpl
 
struct  DirectSumCostTpl
 
struct  DirectSumExplicitDynamicsTpl
 
struct  DynamicsDataTpl
 
struct  DynamicsModelTpl
 Dynamics model: describes system dynamics through an implicit relation \(f(x,u,x') = 0\). More...
 
struct  EqualityConstraintTpl
 Equality constraints \(c(x) = 0\). More...
 
struct  ExplicitDynamicsDataTpl
 Specific data struct for explicit dynamics ExplicitDynamicsModelTpl. More...
 
struct  ExplicitDynamicsModelTpl
 Explicit forward dynamics model \( x_{k+1} = f(x_k, u_k) \). More...
 
struct  FilterTpl
 A basic filter line-search strategy. More...
 
struct  forwardDynamics
 Evaluates the forward map for a discrete dynamics model, implicit or explicit. More...
 
struct  frame_api
 
struct  FrameCollisionDataTpl
 
struct  FrameCollisionResidualTpl
 
struct  FramePlacementDataTpl
 
struct  FramePlacementResidualTpl
 
struct  FrameTranslationDataTpl
 
struct  FrameTranslationResidualTpl
 
struct  FrameVelocityDataTpl
 
struct  FrameVelocityResidualTpl
 
struct  FunctionSliceDataTpl
 
struct  FunctionSliceXprTpl
 Represents a function of which the output is a subset of another function, for instance \(x \mapsto f_\{0, 1, 3\}(x) \) where \(f\) is given. More...
 
struct  FunctionSliceXprTpl< Scalar, StageFunctionTpl< Scalar > >
 
struct  FunctionSliceXprTpl< Scalar, UnaryFunctionTpl< Scalar > >
 
struct  GravityCompensationResidualTpl
 
struct  HistoryCallbackTpl
 Store the history of results. More...
 
struct  LagrangianDerivatives
 Compute the derivatives of the problem Lagrangian. More...
 
struct  LinearFunctionCompositionTpl
 
struct  LinearFunctionTpl
 Linear function \(f(x,u,y) = Ax + Bu + Cy + d\). More...
 
struct  LinearMomentumDataTpl
 
struct  LinearMomentumResidualTpl
 This residual returns the linear momentum for a centroidal model with state \(x = (c, h, L) \). More...
 
struct  LinearUnaryFunctionCompositionTpl
 
class  Linesearch
 Base linesearch class. Design pattern inspired by Google Ceres-Solver. More...
 
struct  LogColumn
 
struct  Logger
 A table logging utility to log the trace of the numerical solvers. More...
 
struct  LogResidualCostTpl
 Log-barrier of an underlying cost function. More...
 
class  ManagedMatrix
 Thin wrapper around Eigen::Map representing a matrix object with memory managed by a C++17 polymorphic allocator. More...
 
struct  ManifoldAbstractTpl
 Base class for manifolds, to use in cost funcs, solvers... More...
 
struct  math_types
 Typedefs for math (Eigen vectors, matrices) depending on scalar type. More...
 
struct  MultibodyConfiguration
 Multibody configuration group \(\mathcal{Q}\), defined using the Pinocchio library. More...
 
struct  MultibodyFrictionConeDataTpl
 
struct  MultibodyFrictionConeResidualTpl
 This residual returns the derivative of centroidal momentum for a kinodynamics model. More...
 
struct  MultibodyPhaseSpace
 The tangent bundle of a multibody configuration group. More...
 
struct  MultibodyWrenchConeDataTpl
 
struct  MultibodyWrenchConeResidualTpl
 This residual returns the derivative of centroidal momentum for a kinodynamics model. More...
 
struct  NegativeOrthantTpl
 Negative orthant, for constraints \(h(x)\leq 0\). More...
 
struct  NewtonRaphson
 Newton-Raphson procedure, e.g. to compute forward dynamics from implicit functions. More...
 
struct  no_alloc_t
 Tag type for e.g. non-allocating constructors. More...
 
struct  NonmonotoneLinesearch
 Nonmonotone Linesearch algorithm. Modifies the Armijo condition with a moving average of function values. More...
 
struct  NonsmoothPenaltyL1Tpl
 Composite \(\ell_1\)-penalty function \( \|c(x)\|_1 \). More...
 
struct  overloads
 Utility helper struct for creating visitors from lambdas. More...
 
struct  PDALFunction
 Primal-dual augmented Lagrangian merit function. More...
 
struct  PinocchioLieGroup
 Wrap a Pinocchio Lie group into a ManifoldAbstractTpl object. More...
 
class  polymorphic_allocator
 A convenience subclass of std::pmr::polymorphic_allocator for bytes. More...
 
struct  PolynomialTpl
 Polynomials represented by their coefficients in decreasing order of degree. More...
 
struct  QFunctionTpl
 Q-function model parameters. More...
 
struct  QuadraticControlCostTpl
 
struct  QuadraticCostDataTpl
 
struct  QuadraticCostTpl
 Euclidean quadratic cost. More...
 
struct  QuadraticResidualCostTpl
 Quadratic composite of an underlying function. More...
 
struct  QuadraticStateCostTpl
 Quadratic distance cost over the state manifold. More...
 
struct  RelaxedLogBarrierCostTpl
 Log-barrier of an underlying cost function. More...
 
struct  ResultsBaseTpl
 
struct  ResultsFDDPTpl
 
struct  ResultsTpl
 Results holder struct. More...
 
class  RuntimeError
 
class  shared_ptr
 STL class. More...
 
struct  SolverFDDPTpl
 The feasible DDP (FDDP) algorithm, from Mastalli et al. (2020). More...
 
struct  SolverProxDDPTpl
 A proximal, augmented Lagrangian-type solver for trajectory optimization. More...
 
struct  StageConstraintTpl
 Simple struct holding together a function and set, to describe a constraint. More...
 
struct  StageDataTpl
 Data struct for stage models StageModelTpl. More...
 
struct  StageFunctionDataTpl
 Base struct for function data. More...
 
struct  StageFunctionTpl
 Class representing ternary functions \(f(x,u,x')\). More...
 
struct  StageModelTpl
 A stage in the control problem. More...
 
struct  StateErrorResidualTpl
 State error \(x \ominus x_\text{ref}\). More...
 
struct  TangentBundleTpl
 Tangent bundle of a base manifold M. More...
 
struct  TrajOptDataTpl
 Problem data struct. More...
 
struct  TrajOptProblemTpl
 Trajectory optimization problem. More...
 
struct  UnaryFunctionTpl
 Represents unary functions of the form \(f(x)\), with no control (or next-state) arguments. More...
 
struct  ValueFunctionTpl
 Storage for the value function model parameters. More...
 
class  vector
 STL class. More...
 
struct  VectorSpaceTpl
 Standard Euclidean vector space. More...
 
struct  WorkspaceBaseTpl
 Base workspace struct for the algorithms. More...
 
struct  WorkspaceFDDPTpl
 Workspace for solver SolverFDDP. More...
 
struct  WorkspaceTpl
 Workspace for solver SolverProxDDP. More...
 

Typedefs

template<typename Base, typename U, typename A = std::allocator<U>>
using is_polymorphic_of = std::is_same<std::decay_t<U>, xyz::polymorphic<U, A>>
 
template<typename T, typename T2 = void>
using enable_if_eigen_dense = std::enable_if_t<is_eigen_dense_type<T>, T2>
 
using byte_t = std::byte
 
template<typename G>
using is_pinocchio_lie_group = std::is_base_of<pin::LieGroupBase<G>, G>
 
template<int D, typename Scalar>
using SETpl = PinocchioLieGroup<pin::SpecialEuclideanOperationTpl<D, Scalar>>
 
template<int D, typename Scalar>
using SOTpl = PinocchioLieGroup<pin::SpecialOrthogonalOperationTpl<D, Scalar>>
 
using uint = unsigned int
 

Enumerations

enum struct  RolloutType { LINEAR , NONLINEAR }
 
enum struct  ErrorCode { UNINITIALIZED , UNSUPPORTED_OPTION , NAN_DETECTED }
 
enum struct  HessianApprox { EXACT , GAUSS_NEWTON , BFGS }
 
enum struct  MultiplierUpdateMode { NEWTON , PRIMAL , PRIMAL_DUAL }
 
enum struct  LinesearchMode { PRIMAL = 0 , PRIMAL_DUAL = 1 }
 Whether to use merit functions in primal or primal-dual mode. More...
 
enum struct  StepAcceptanceStrategy { LINESEARCH_ARMIJO , LINESEARCH_NONMONOTONE , FILTER }
 Whether to use linesearch or filter during step acceptance phase. More...
 
enum class  LinesearchStrategy { ARMIJO , WOLFE }
 
enum class  LSInterpolation { BISECTION , QUADRATIC , CUBIC }
 
enum  VerboseLevel { QUIET = 0 , VERBOSE = 1 , VERYVERBOSE = 2 }
 Verbosity level. More...
 
enum class  LQSolverChoice { SERIAL , PARALLEL , STAGEDENSE }
 

Functions

template<typename S>
std::ostream & operator<< (std::ostream &oss, const ExplicitDynamicsDataTpl< S > &self)
 
template<typename T>
std::ostream & operator<< (std::ostream &oss, const StageFunctionDataTpl< T > &self)
 
template<typename Scalar>
std::ostream & operator<< (std::ostream &oss, const StageModelTpl< Scalar > &stage)
 
template<typename Scalar>
Scalar computeTrajectoryCost (const TrajOptDataTpl< Scalar > &problem_data)
 Helper for computing the trajectory cost (from pre-computed problem data).
 
template<typename D>
auto eigenPrintWithPreamble (const Eigen::EigenBase< D > &mat, const std::string &text, Eigen::IOFormat ft=EIGEN_DEFAULT_IO_FORMAT)
 
template<typename MatrixType, int Alignment = Eigen::AlignedMax>
auto allocate_eigen_map (polymorphic_allocator alloc, Eigen::Index rows, Eigen::Index cols)
 
template<typename MatrixType, int Alignment = Eigen::AlignedMax>
auto allocate_eigen_map (polymorphic_allocator alloc, Eigen::Index size)
 
template<typename MatrixType, int Alignment>
void emplace_map_steal (Eigen::Map< MatrixType, Alignment > &map, Eigen::Map< MatrixType, Alignment > &other)
 In-place construct a map from another one by stealing the other's data.
 
template<typename MatrixType, int Alignment>
void emplace_map_from_data (Eigen::Map< MatrixType, Alignment > &map, Eigen::Index rows, Eigen::Index cols, typename MatrixType::Scalar *data)
 Use placement new to create an Eigen::Map object with given dimensions and data pointer.
 
template<typename MatrixType, int Alignment>
void emplace_map_from_data (Eigen::Map< MatrixType, Alignment > &map, Eigen::Index size, typename MatrixType::Scalar *data)
 
template<typename MatrixType, int Alignment>
void emplace_allocated_map (Eigen::Map< MatrixType, Alignment > &map, Eigen::Index rows, Eigen::Index cols, polymorphic_allocator alloc)
 Use placement new and an allocator to create an Eigen::Map object to it.
 
template<typename MatrixType, int Alignment>
void emplace_allocated_map (Eigen::Map< MatrixType, Alignment > &map, Eigen::Index size, polymorphic_allocator alloc)
 Use placement new and an allocator to create an Eigen::Map object to it.
 
template<typename MatrixType, int Alignment>
void emplace_resize_map (Eigen::Map< MatrixType, Alignment > &map, Eigen::Index rows, Eigen::Index cols, polymorphic_allocator alloc)
 
template<typename MatrixType, int Alignment>
void deallocate_map (Eigen::Map< MatrixType, Alignment > &map, polymorphic_allocator alloc)
 
template<typename MatrixType, int Alignment>
void emplace_map_copy (Eigen::Map< MatrixType, Alignment > &map, const Eigen::Map< MatrixType, Alignment > &other, polymorphic_allocator alloc)
 Create a deep copy of a managed Eigen::Map object.
 
template<typename Derived>
auto blockMatrixGetRow (const Eigen::MatrixBase< Derived > &matrix, const std::vector< Eigen::Index > &rowBlockSizes, std::size_t rowIdx)
 
template<typename Derived>
auto blockVectorGetRow (const Eigen::MatrixBase< Derived > &matrix, const std::vector< Eigen::Index > &blockSizes, std::size_t blockIdx)
 
template<typename Scalar>
auto directSum (xyz::polymorphic< CostAbstractTpl< Scalar > > const &c1, xyz::polymorphic< CostAbstractTpl< Scalar > > const &c2)
 
template<typename T>
xyz::polymorphic< CostStackTpl< T > > operator+ (const CostPtr< T > &c1, const CostPtr< T > &c2)
 
template<typename T>
xyz::polymorphic< CostStackTpl< T > > operator+ (xyz::polymorphic< CostStackTpl< T > > &&c1, const CostPtr< T > &c2)
 
template<typename T>
xyz::polymorphic< CostStackTpl< T > > operator+ (xyz::polymorphic< CostStackTpl< T > > &&c1, CostPtr< T > &&c2)
 
template<typename T>
xyz::polymorphic< CostStackTpl< T > > operator+ (const xyz::polymorphic< CostStackTpl< T > > &c1, CostPtr< T > &&c2)
 
template<typename T>
xyz::polymorphic< CostStackTpl< T > > operator* (T u, xyz::polymorphic< CostStackTpl< T > > &&c1)
 
template<typename Scalar>
auto directSum (xyz::polymorphic< ExplicitDynamicsModelTpl< Scalar > > const &m1, xyz::polymorphic< ExplicitDynamicsModelTpl< Scalar > > const &m2)
 
template<typename Scalar>
auto linear_compose (xyz::polymorphic< StageFunctionTpl< Scalar > > func, const typename math_types< Scalar >::ConstMatrixRef A, const typename math_types< Scalar >::ConstVectorRef b)
 Create a linear composition of the input function func.
 
template<typename Scalar>
auto linear_compose (xyz::polymorphic< UnaryFunctionTpl< Scalar > > func, const typename math_types< Scalar >::ConstMatrixRef A, const typename math_types< Scalar >::ConstVectorRef b)
 Create a linear composition of the input function func. This will return a UnaryFunctionTpl.
 
template<typename Scalar, typename ConfigType, typename VelType, typename MatrixType, typename OutType, int Options>
void underactuatedConstrainedInverseDynamics (const ModelTpl< Scalar, Options > &model, DataTpl< Scalar, Options > &data, const Eigen::MatrixBase< ConfigType > &q, Eigen::MatrixBase< VelType > const &v, const Eigen::MatrixBase< MatrixType > &actMatrix, const StdVectorEigenAligned< RigidConstraintModelTpl< Scalar, Options > > &constraint_models, StdVectorEigenAligned< RigidConstraintDataTpl< Scalar, Options > > &constraint_datas, const Eigen::MatrixBase< OutType > &res_)
 
template<typename T>
auto operator* (const xyz::polymorphic< ManifoldAbstractTpl< T > > &left, const xyz::polymorphic< ManifoldAbstractTpl< T > > &right)
 
template<typename T>
auto operator* (const CartesianProductTpl< T > &left, const xyz::polymorphic< ManifoldAbstractTpl< T > > &right)
 
template<typename T>
auto operator* (const xyz::polymorphic< ManifoldAbstractTpl< T > > &left, const CartesianProductTpl< T > &right)
 
template<typename T>
auto operator* (const CartesianProductTpl< T > &left, const CartesianProductTpl< T > &right)
 
template<class... Ts>
 overloads (Ts...) -> overloads< Ts... >
 
template<typename Scalar, typename F, typename M>
ALIGATOR_INLINE std::pair< Scalar, Scalar > fddp_goldstein_linesearch (F &&phi, M &&model, const Scalar phi0, const typename Linesearch< Scalar >::Options &ls_params, Scalar th_grad, Scalar &d1, Scalar th_accept_step=0.1, Scalar th_accept_neg_step=2.0)
 The backtracking linesearch from FDDP (Mastalli et al).
 
template<typename Scalar>
Scalar costDirectionalDerivative (const WorkspaceTpl< Scalar > &workspace, const TrajOptDataTpl< Scalar > &prob_data)
 
template<typename Scalar>
std::ostream & operator<< (std::ostream &oss, const ResultsTpl< Scalar > &self)
 
template<typename Scalar>
auto getConstraintProductSet (const ConstraintStackTpl< Scalar > &constraints)
 
template<typename Scalar>
std::ostream & operator<< (std::ostream &oss, const WorkspaceTpl< Scalar > &self)
 
template<typename Scalar>
std::ostream & operator<< (std::ostream &oss, const ResultsBaseTpl< Scalar > &self)
 
template<typename Scalar>
void xs_default_init (const TrajOptProblemTpl< Scalar > &problem, std::vector< typename math_types< Scalar >::VectorXs > &xs)
 Default-initialize a trajectory to the neutral states for each state space at each stage.
 
template<typename Scalar>
void us_default_init (const TrajOptProblemTpl< Scalar > &problem, std::vector< typename math_types< Scalar >::VectorXs > &us)
 Default-initialize a controls trajectory from the neutral element of each control space.
 
template<typename T1, typename T2>
bool assign_no_resize (const std::vector< T1 > &lhs, std::vector< T2 > &rhs)
 Assign a vector of Eigen types into another, ensure there is no resize.
 
template<typename T, typename Alloc>
void rotate_vec_left (std::vector< T, Alloc > &v, long n_head=0, long n_tail=0)
 Simply rotate an entire std::vector to the left.
 
template<typename Scalar>
math_types< Scalar >::VectorOfVectors rollout (const std::vector< xyz::polymorphic< DynamicsModelTpl< Scalar > > > &dyn_models, const typename math_types< Scalar >::VectorXs &x0, const typename math_types< Scalar >::VectorOfVectors &us, typename math_types< Scalar >::VectorOfVectors &xout)
 Perform a rollout of the supplied dynamical models.
 
template<typename Scalar>
math_types< Scalar >::VectorOfVectors rollout (const DynamicsModelTpl< Scalar > &dyn_model, const typename math_types< Scalar >::VectorXs &x0, const typename math_types< Scalar >::VectorOfVectors &us)
 Perform a rollout of the supplied dynamical models.
 
template<typename Scalar>
void rollout (const std::vector< xyz::polymorphic< ExplicitDynamicsModelTpl< Scalar > > > &dyn_models, const typename math_types< Scalar >::VectorXs &x0, const typename math_types< Scalar >::VectorOfVectors &us, typename math_types< Scalar >::VectorOfVectors &xout)
 Perform a rollout of the supplied dynamical models.
 
template<typename Scalar>
void rollout (const ExplicitDynamicsModelTpl< Scalar > &dyn_model, const typename math_types< Scalar >::VectorXs &x0, const typename math_types< Scalar >::VectorOfVectors &us, typename math_types< Scalar >::VectorOfVectors &xout)
 Perform a rollout of the supplied dynamical models. Rolls out a single ExplicitDynamicsModelTpl.
 
template<template< typename > class C, typename Scalar>
math_types< Scalar >::VectorOfVectors rollout (const C< Scalar > &dms, const typename math_types< Scalar >::VectorXs &x0, const typename math_types< Scalar >::VectorOfVectors &us)
 Perform a rollout of the supplied dynamical models. This variant allocates the output and returns it.
 
template<template< typename > class C, typename Scalar>
math_types< Scalar >::VectorOfVectors rollout (const std::vector< xyz::polymorphic< C< Scalar > > > &dms, const typename math_types< Scalar >::VectorXs &x0, const typename math_types< Scalar >::VectorOfVectors &us)
 Perform a rollout of the supplied dynamical models. This variant allocates the output and returns it.
 
 _process ()
 

Variables

template<typename Base, typename U, typename A = std::allocator<U>>
constexpr bool is_polymorphic_of_v = is_polymorphic_of<Base, U, A>::value
 
template<typename T>
constexpr bool is_eigen_dense_type
 
template<typename T>
constexpr bool is_eigen_matrix_type
 
constexpr no_alloc_t no_alloc {}
 
constexpr std::string_view int_format = "{: >{}d} "
 
constexpr std::string_view sci_format = "{: >{}.3e} "
 
constexpr std::string_view dbl_format = "{: >{}.3g} "
 
static const LogColumn BASIC_KEYS [12]
 

Detailed Description

Main package namespace.

The following overload for get_pointer is defined here, to avoid conflicts with other Boost libraries using get_pointer() without seeing this overload if included later.

Author
Wilson Jallet
Author
Wilson Jallet
Author
Wilson Jallet
Author
Wilson Jallet
Author
Wilson Jallet
Copyright (C) 2022 LAAS-CNRS, 2022-2025 INRIA

Typedef Documentation

◆ is_polymorphic_of

template<typename Base, typename U, typename A = std::allocator<U>>
using aligator::is_polymorphic_of = std::is_same<std::decay_t<U>, xyz::polymorphic<U, A>>

Definition at line 65 of file fwd.hpp.

◆ enable_if_eigen_dense

template<typename T, typename T2 = void>
using aligator::enable_if_eigen_dense = std::enable_if_t<is_eigen_dense_type<T>, T2>

Definition at line 64 of file math.hpp.

◆ byte_t

using aligator::byte_t = std::byte

Definition at line 9 of file allocator.hpp.

◆ is_pinocchio_lie_group

template<typename G>
using aligator::is_pinocchio_lie_group = std::is_base_of<pin::LieGroupBase<G>, G>

Type trait. Indicates whether

Template Parameters
Gis derived from pinocchio::LieGroupBase.

Definition at line 17 of file pinocchio-groups.hpp.

◆ SETpl

template<int D, typename Scalar>
using aligator::SETpl = PinocchioLieGroup<pin::SpecialEuclideanOperationTpl<D, Scalar>>

Definition at line 112 of file pinocchio-groups.hpp.

◆ SOTpl

template<int D, typename Scalar>
using aligator::SOTpl = PinocchioLieGroup<pin::SpecialOrthogonalOperationTpl<D, Scalar>>

Definition at line 115 of file pinocchio-groups.hpp.

◆ uint

using aligator::uint = unsigned int

Definition at line 10 of file logger.hpp.

Enumeration Type Documentation

◆ RolloutType

enum struct aligator::RolloutType
strong
Enumerator
LINEAR 

Linear rollout.

NONLINEAR 

Nonlinear rollout, using the full dynamics.

Definition at line 5 of file enums.hpp.

◆ ErrorCode

enum struct aligator::ErrorCode
strong
Enumerator
UNINITIALIZED 
UNSUPPORTED_OPTION 
NAN_DETECTED 

Definition at line 12 of file enums.hpp.

◆ HessianApprox

enum struct aligator::HessianApprox
strong
Enumerator
EXACT 

Use exact Hessian.

GAUSS_NEWTON 

Use the Gauss-Newton approximation.

BFGS 

Use a BFGS-type approximation.

Definition at line 14 of file enums.hpp.

◆ MultiplierUpdateMode

enum struct aligator::MultiplierUpdateMode
strong
Enumerator
NEWTON 
PRIMAL 
PRIMAL_DUAL 

Definition at line 23 of file enums.hpp.

◆ LinesearchMode

enum struct aligator::LinesearchMode
strong

Whether to use merit functions in primal or primal-dual mode.

Enumerator
PRIMAL 
PRIMAL_DUAL 

Definition at line 26 of file enums.hpp.

◆ StepAcceptanceStrategy

Whether to use linesearch or filter during step acceptance phase.

Enumerator
LINESEARCH_ARMIJO 
LINESEARCH_NONMONOTONE 
FILTER 

Definition at line 29 of file enums.hpp.

◆ LinesearchStrategy

enum class aligator::LinesearchStrategy
strong
Enumerator
ARMIJO 
WOLFE 

Definition at line 10 of file linesearch-base.hpp.

◆ LSInterpolation

enum class aligator::LSInterpolation
strong
Enumerator
BISECTION 
QUADRATIC 
CUBIC 

Definition at line 11 of file linesearch-base.hpp.

◆ VerboseLevel

Verbosity level.

Enumerator
QUIET 
VERBOSE 
VERYVERBOSE 

Definition at line 82 of file fwd.hpp.

◆ LQSolverChoice

enum class aligator::LQSolverChoice
strong
Enumerator
SERIAL 
PARALLEL 
STAGEDENSE 

Definition at line 26 of file solver-proxddp.hpp.

Function Documentation

◆ operator<<() [1/6]

template<typename S>
std::ostream & aligator::operator<< ( std::ostream & oss,
const ExplicitDynamicsDataTpl< S > & self )

Definition at line 85 of file explicit-dynamics.hpp.

◆ operator<<() [2/6]

template<typename T>
std::ostream & aligator::operator<< ( std::ostream & oss,
const StageFunctionDataTpl< T > & self )

◆ operator<<() [3/6]

template<typename Scalar>
std::ostream & aligator::operator<< ( std::ostream & oss,
const StageModelTpl< Scalar > & stage )

Definition at line 156 of file stage-model.hpp.

◆ computeTrajectoryCost()

template<typename Scalar>
Scalar aligator::computeTrajectoryCost ( const TrajOptDataTpl< Scalar > & problem_data)

Helper for computing the trajectory cost (from pre-computed problem data).

Warning
Call TrajOptProblemTpl::evaluate() first!

◆ eigenPrintWithPreamble()

template<typename D>
auto aligator::eigenPrintWithPreamble ( const Eigen::EigenBase< D > & mat,
const std::string & text,
Eigen::IOFormat ft = EIGEN_DEFAULT_IO_FORMAT )

Prints an Eigen object using Eigen::IOFormat with a piece of text prepended and all rows shifted by the length of that text.

Definition at line 109 of file math.hpp.

◆ allocate_eigen_map() [1/2]

template<typename MatrixType, int Alignment = Eigen::AlignedMax>
auto aligator::allocate_eigen_map ( polymorphic_allocator alloc,
Eigen::Index rows,
Eigen::Index cols )
nodiscard

Definition at line 10 of file eigen-map.hpp.

◆ allocate_eigen_map() [2/2]

template<typename MatrixType, int Alignment = Eigen::AlignedMax>
auto aligator::allocate_eigen_map ( polymorphic_allocator alloc,
Eigen::Index size )
nodiscard

Definition at line 20 of file eigen-map.hpp.

◆ emplace_map_steal()

template<typename MatrixType, int Alignment>
void aligator::emplace_map_steal ( Eigen::Map< MatrixType, Alignment > & map,
Eigen::Map< MatrixType, Alignment > & other )

In-place construct a map from another one by stealing the other's data.

Definition at line 31 of file eigen-map.hpp.

◆ emplace_map_from_data() [1/2]

template<typename MatrixType, int Alignment>
void aligator::emplace_map_from_data ( Eigen::Map< MatrixType, Alignment > & map,
Eigen::Index rows,
Eigen::Index cols,
typename MatrixType::Scalar * data )

Use placement new to create an Eigen::Map object with given dimensions and data pointer.

Definition at line 49 of file eigen-map.hpp.

◆ emplace_map_from_data() [2/2]

template<typename MatrixType, int Alignment>
void aligator::emplace_map_from_data ( Eigen::Map< MatrixType, Alignment > & map,
Eigen::Index size,
typename MatrixType::Scalar * data )

Definition at line 59 of file eigen-map.hpp.

◆ emplace_allocated_map() [1/2]

template<typename MatrixType, int Alignment>
void aligator::emplace_allocated_map ( Eigen::Map< MatrixType, Alignment > & map,
Eigen::Index rows,
Eigen::Index cols,
polymorphic_allocator alloc )

Use placement new and an allocator to create an Eigen::Map object to it.

Definition at line 71 of file eigen-map.hpp.

◆ emplace_allocated_map() [2/2]

template<typename MatrixType, int Alignment>
void aligator::emplace_allocated_map ( Eigen::Map< MatrixType, Alignment > & map,
Eigen::Index size,
polymorphic_allocator alloc )

Use placement new and an allocator to create an Eigen::Map object to it.

Definition at line 81 of file eigen-map.hpp.

◆ emplace_resize_map()

template<typename MatrixType, int Alignment>
void aligator::emplace_resize_map ( Eigen::Map< MatrixType, Alignment > & map,
Eigen::Index rows,
Eigen::Index cols,
polymorphic_allocator alloc )

Definition at line 89 of file eigen-map.hpp.

◆ deallocate_map()

template<typename MatrixType, int Alignment>
void aligator::deallocate_map ( Eigen::Map< MatrixType, Alignment > & map,
polymorphic_allocator alloc )

Definition at line 106 of file eigen-map.hpp.

◆ emplace_map_copy()

template<typename MatrixType, int Alignment>
void aligator::emplace_map_copy ( Eigen::Map< MatrixType, Alignment > & map,
const Eigen::Map< MatrixType, Alignment > & other,
polymorphic_allocator alloc )

Create a deep copy of a managed Eigen::Map object.

Definition at line 117 of file eigen-map.hpp.

◆ blockMatrixGetRow()

template<typename Derived>
auto aligator::blockMatrixGetRow ( const Eigen::MatrixBase< Derived > & matrix,
const std::vector< Eigen::Index > & rowBlockSizes,
std::size_t rowIdx )

Definition at line 10 of file constraint-set-product.hpp.

◆ blockVectorGetRow()

template<typename Derived>
auto aligator::blockVectorGetRow ( const Eigen::MatrixBase< Derived > & matrix,
const std::vector< Eigen::Index > & blockSizes,
std::size_t blockIdx )

Definition at line 22 of file constraint-set-product.hpp.

◆ directSum() [1/2]

template<typename Scalar>
auto aligator::directSum ( xyz::polymorphic< CostAbstractTpl< Scalar > > const & c1,
xyz::polymorphic< CostAbstractTpl< Scalar > > const & c2 )

Definition at line 127 of file cost-direct-sum.hpp.

◆ operator+() [1/4]

template<typename T>
xyz::polymorphic< CostStackTpl< T > > aligator::operator+ ( const CostPtr< T > & c1,
const CostPtr< T > & c2 )

Definition at line 105 of file sum-of-costs.hpp.

◆ operator+() [2/4]

template<typename T>
xyz::polymorphic< CostStackTpl< T > > aligator::operator+ ( xyz::polymorphic< CostStackTpl< T > > && c1,
const CostPtr< T > & c2 )

Definition at line 112 of file sum-of-costs.hpp.

◆ operator+() [3/4]

template<typename T>
xyz::polymorphic< CostStackTpl< T > > aligator::operator+ ( xyz::polymorphic< CostStackTpl< T > > && c1,
CostPtr< T > && c2 )

Definition at line 119 of file sum-of-costs.hpp.

◆ operator+() [4/4]

template<typename T>
xyz::polymorphic< CostStackTpl< T > > aligator::operator+ ( const xyz::polymorphic< CostStackTpl< T > > & c1,
CostPtr< T > && c2 )

Definition at line 126 of file sum-of-costs.hpp.

◆ operator*() [1/5]

template<typename T>
xyz::polymorphic< CostStackTpl< T > > aligator::operator* ( T u,
xyz::polymorphic< CostStackTpl< T > > && c1 )

Definition at line 133 of file sum-of-costs.hpp.

◆ directSum() [2/2]

template<typename Scalar>
auto aligator::directSum ( xyz::polymorphic< ExplicitDynamicsModelTpl< Scalar > > const & m1,
xyz::polymorphic< ExplicitDynamicsModelTpl< Scalar > > const & m2 )

Definition at line 54 of file explicit-dynamics-direct-sum.hpp.

◆ linear_compose() [1/2]

template<typename Scalar>
auto aligator::linear_compose ( xyz::polymorphic< StageFunctionTpl< Scalar > > func,
const typename math_types< Scalar >::ConstMatrixRef A,
const typename math_types< Scalar >::ConstVectorRef b )

Create a linear composition of the input function func.

Definition at line 100 of file linear-function-composition.hpp.

◆ linear_compose() [2/2]

template<typename Scalar>
auto aligator::linear_compose ( xyz::polymorphic< UnaryFunctionTpl< Scalar > > func,
const typename math_types< Scalar >::ConstMatrixRef A,
const typename math_types< Scalar >::ConstVectorRef b )

Create a linear composition of the input function func. This will return a UnaryFunctionTpl.

Definition at line 108 of file linear-function-composition.hpp.

◆ underactuatedConstrainedInverseDynamics()

template<typename Scalar, typename ConfigType, typename VelType, typename MatrixType, typename OutType, int Options>
void aligator::underactuatedConstrainedInverseDynamics ( const ModelTpl< Scalar, Options > & model,
DataTpl< Scalar, Options > & data,
const Eigen::MatrixBase< ConfigType > & q,
Eigen::MatrixBase< VelType > const & v,
const Eigen::MatrixBase< MatrixType > & actMatrix,
const StdVectorEigenAligned< RigidConstraintModelTpl< Scalar, Options > > & constraint_models,
StdVectorEigenAligned< RigidConstraintDataTpl< Scalar, Options > > & constraint_datas,
const Eigen::MatrixBase< OutType > & res_ )

Definition at line 22 of file constrained-rnea.hpp.

◆ operator*() [2/5]

template<typename T>
auto aligator::operator* ( const xyz::polymorphic< ManifoldAbstractTpl< T > > & left,
const xyz::polymorphic< ManifoldAbstractTpl< T > > & right )

Definition at line 125 of file cartesian-product.hpp.

◆ operator*() [3/5]

template<typename T>
auto aligator::operator* ( const CartesianProductTpl< T > & left,
const xyz::polymorphic< ManifoldAbstractTpl< T > > & right )

Definition at line 131 of file cartesian-product.hpp.

◆ operator*() [4/5]

template<typename T>
auto aligator::operator* ( const xyz::polymorphic< ManifoldAbstractTpl< T > > & left,
const CartesianProductTpl< T > & right )

Definition at line 139 of file cartesian-product.hpp.

◆ operator*() [5/5]

template<typename T>
auto aligator::operator* ( const CartesianProductTpl< T > & left,
const CartesianProductTpl< T > & right )

Definition at line 145 of file cartesian-product.hpp.

◆ overloads()

template<class... Ts>
aligator::overloads ( Ts... ) -> overloads< Ts... >

◆ fddp_goldstein_linesearch()

template<typename Scalar, typename F, typename M>
ALIGATOR_INLINE std::pair< Scalar, Scalar > aligator::fddp_goldstein_linesearch ( F && phi,
M && model,
const Scalar phi0,
const typename Linesearch< Scalar >::Options & ls_params,
Scalar th_grad,
Scalar & d1,
Scalar th_accept_step = 0.1,
Scalar th_accept_neg_step = 2.0 )

The backtracking linesearch from FDDP (Mastalli et al).

The conditions that are checked for are not exactly the Goldstein conditions.

Returns
an std::pair

Definition at line 17 of file linesearch.hpp.

◆ costDirectionalDerivative()

template<typename Scalar>
Scalar aligator::costDirectionalDerivative ( const WorkspaceTpl< Scalar > & workspace,
const TrajOptDataTpl< Scalar > & prob_data )

◆ operator<<() [4/6]

template<typename Scalar>
std::ostream & aligator::operator<< ( std::ostream & oss,
const ResultsTpl< Scalar > & self )

Definition at line 47 of file results.hpp.

◆ getConstraintProductSet()

template<typename Scalar>
auto aligator::getConstraintProductSet ( const ConstraintStackTpl< Scalar > & constraints)

Definition at line 15 of file workspace.hpp.

◆ operator<<() [5/6]

template<typename Scalar>
std::ostream & aligator::operator<< ( std::ostream & oss,
const WorkspaceTpl< Scalar > & self )

Definition at line 126 of file workspace.hpp.

◆ operator<<() [6/6]

template<typename Scalar>
std::ostream & aligator::operator<< ( std::ostream & oss,
const ResultsBaseTpl< Scalar > & self )

Definition at line 103 of file results-base.hpp.

◆ xs_default_init()

template<typename Scalar>
void aligator::xs_default_init ( const TrajOptProblemTpl< Scalar > & problem,
std::vector< typename math_types< Scalar >::VectorXs > & xs )

Default-initialize a trajectory to the neutral states for each state space at each stage.

Definition at line 13 of file solver-util.hpp.

◆ us_default_init()

template<typename Scalar>
void aligator::us_default_init ( const TrajOptProblemTpl< Scalar > & problem,
std::vector< typename math_types< Scalar >::VectorXs > & us )

Default-initialize a controls trajectory from the neutral element of each control space.

Definition at line 37 of file solver-util.hpp.

◆ assign_no_resize()

template<typename T1, typename T2>
bool aligator::assign_no_resize ( const std::vector< T1 > & lhs,
std::vector< T2 > & rhs )
nodiscard

Assign a vector of Eigen types into another, ensure there is no resize.

Definition at line 50 of file solver-util.hpp.

◆ rotate_vec_left()

template<typename T, typename Alloc>
void aligator::rotate_vec_left ( std::vector< T, Alloc > & v,
long n_head = 0,
long n_tail = 0 )

Simply rotate an entire std::vector to the left.

Template Parameters
T
Alloc
Parameters
n_headThe length of the vector (at the head) to keep.
n_tailThe length of the vector (at the tail ) to keep.

Definition at line 17 of file mpc-util.hpp.

◆ rollout() [1/6]

template<typename Scalar>
math_types< Scalar >::VectorOfVectors aligator::rollout ( const std::vector< xyz::polymorphic< DynamicsModelTpl< Scalar > > > & dyn_models,
const typename math_types< Scalar >::VectorXs & x0,
const typename math_types< Scalar >::VectorOfVectors & us,
typename math_types< Scalar >::VectorOfVectors & xout )

Perform a rollout of the supplied dynamical models.

Definition at line 9 of file rollout.hpp.

◆ rollout() [2/6]

template<typename Scalar>
math_types< Scalar >::VectorOfVectors aligator::rollout ( const DynamicsModelTpl< Scalar > & dyn_model,
const typename math_types< Scalar >::VectorXs & x0,
const typename math_types< Scalar >::VectorOfVectors & us )

Perform a rollout of the supplied dynamical models.

Definition at line 36 of file rollout.hpp.

◆ rollout() [3/6]

template<typename Scalar>
void aligator::rollout ( const std::vector< xyz::polymorphic< ExplicitDynamicsModelTpl< Scalar > > > & dyn_models,
const typename math_types< Scalar >::VectorXs & x0,
const typename math_types< Scalar >::VectorOfVectors & us,
typename math_types< Scalar >::VectorOfVectors & xout )

Perform a rollout of the supplied dynamical models.

This overload applies to explicit forward dynamics.

Definition at line 57 of file rollout.hpp.

◆ rollout() [4/6]

template<typename Scalar>
void aligator::rollout ( const ExplicitDynamicsModelTpl< Scalar > & dyn_model,
const typename math_types< Scalar >::VectorXs & x0,
const typename math_types< Scalar >::VectorOfVectors & us,
typename math_types< Scalar >::VectorOfVectors & xout )

Perform a rollout of the supplied dynamical models. Rolls out a single ExplicitDynamicsModelTpl.

Definition at line 83 of file rollout.hpp.

◆ rollout() [5/6]

template<template< typename > class C, typename Scalar>
math_types< Scalar >::VectorOfVectors aligator::rollout ( const C< Scalar > & dms,
const typename math_types< Scalar >::VectorXs & x0,
const typename math_types< Scalar >::VectorOfVectors & us )

Perform a rollout of the supplied dynamical models. This variant allocates the output and returns it.

Definition at line 103 of file rollout.hpp.

◆ rollout() [6/6]

template<template< typename > class C, typename Scalar>
math_types< Scalar >::VectorOfVectors aligator::rollout ( const std::vector< xyz::polymorphic< C< Scalar > > > & dms,
const typename math_types< Scalar >::VectorXs & x0,
const typename math_types< Scalar >::VectorOfVectors & us )

Perform a rollout of the supplied dynamical models. This variant allocates the output and returns it.

Definition at line 115 of file rollout.hpp.

◆ _process()

aligator._process ( )
protected

Definition at line 10 of file __init__.py.

Variable Documentation

◆ is_polymorphic_of_v

template<typename Base, typename U, typename A = std::allocator<U>>
bool aligator::is_polymorphic_of_v = is_polymorphic_of<Base, U, A>::value
constexpr

Definition at line 68 of file fwd.hpp.

◆ is_eigen_dense_type

template<typename T>
bool aligator::is_eigen_dense_type
inlineconstexpr
Initial value:
=
std::is_base_of_v<Eigen::DenseBase<T>, T>

Definition at line 56 of file math.hpp.

◆ is_eigen_matrix_type

template<typename T>
bool aligator::is_eigen_matrix_type
inlineconstexpr
Initial value:
=
std::is_base_of_v<Eigen::MatrixBase<T>, T>

Definition at line 60 of file math.hpp.

◆ no_alloc

no_alloc_t aligator::no_alloc {}
inlineconstexpr

Definition at line 10 of file tags.hpp.

◆ int_format

std::string_view aligator::int_format = "{: >{}d} "
constexpr

Definition at line 12 of file logger.hpp.

◆ sci_format

std::string_view aligator::sci_format = "{: >{}.3e} "
constexpr

Definition at line 13 of file logger.hpp.

◆ dbl_format

std::string_view aligator::dbl_format = "{: >{}.3g} "
constexpr

Definition at line 14 of file logger.hpp.

◆ BASIC_KEYS

const LogColumn aligator::BASIC_KEYS[12]
static
Initial value:
= {
{"iter", int_format, 5U}, {"alpha", sci_format, 10U},
{"inner_crit", sci_format, 11U}, {"prim_err", sci_format, 10U},
{"dual_err", sci_format, 10U}, {"preg", sci_format, 10U},
{"cost", sci_format, 10U}, {"dphi0", sci_format, 11U},
{"merit", sci_format, 10U}, {"ΔM", sci_format, 11U},
{"aliter", int_format, 7U}, {"mu", dbl_format, 7U}}
constexpr std::string_view sci_format
Definition logger.hpp:13
constexpr std::string_view dbl_format
Definition logger.hpp:14
constexpr std::string_view int_format
Definition logger.hpp:12

Definition at line 22 of file logger.hpp.