aligator  0.14.0
A primal-dual augmented Lagrangian-type solver for nonlinear trajectory optimization.
Loading...
Searching...
No Matches
proximal-riccati.hpp
Go to the documentation of this file.
1
2#pragma once
3
4#include "riccati-base.hpp"
5#include "riccati-kernel.hpp"
6
7namespace aligator {
8namespace gar {
9
11template <typename _Scalar>
13public:
14 using Scalar = _Scalar;
17 using StageFactorVec = std::vector<StageFactor<Scalar>>;
19
22 using value_t = typename StageFactorType::value_t;
23 using kkt0_t = typename Kernel::kkt0_t;
25
27
29 bool backward(const Scalar mudyn, const Scalar mueq);
30
31 bool forward(std::vector<VectorXs> &xs, std::vector<VectorXs> &us,
32 std::vector<VectorXs> &vs, std::vector<VectorXs> &lbdas,
33 const std::optional<ConstVectorRef> &theta = std::nullopt) const;
34
35 void cycleAppend(const KnotType &knot);
36 VectorRef getFeedforward(size_t i) { return datas[i].ff.matrix(); }
37 RowMatrixRef getFeedback(size_t i) { return datas[i].fb.matrix(); }
38
39 kkt0_t kkt0; //< initial stage KKT system
40 VectorXs thGrad; //< optimal value gradient wrt parameter
41 MatrixXs thHess; //< optimal value Hessian wrt parameter
42
43protected:
45};
46
47#ifdef ALIGATOR_ENABLE_TEMPLATE_INSTANTIATION
48extern template class ProximalRiccatiSolver<context::Scalar>;
49#endif
50
51} // namespace gar
52} // namespace aligator
A Riccati-like solver for the proximal LQ subproblem in ProxDDP.
ProximalRiccatiKernel< Scalar > Kernel
std::vector< StageFactor< Scalar > > StageFactorVec
void cycleAppend(const KnotType &knot)
typename Kernel::StageFactorType StageFactorType
bool forward(std::vector< VectorXs > &xs, std::vector< VectorXs > &us, std::vector< VectorXs > &vs, std::vector< VectorXs > &lbdas, const std::optional< ConstVectorRef > &theta=std::nullopt) const
bool backward(const Scalar mudyn, const Scalar mueq)
Backward sweep.
typename StageFactorType::value_t value_t
ProximalRiccatiSolver(const LqrProblemTpl< Scalar > &problem)
Main package namespace.
Struct describing a stage of a constrained LQ problem.
Kernel for use in Riccati-like algorithms for the proximal LQ subproblem.