aligator  0.16.0
A versatile and efficient C++ library for real-time constrained trajectory optimization.
Loading...
Searching...
No Matches
riccati-base.hpp
Go to the documentation of this file.
1
3#pragma once
4
6#include "aligator/math.hpp"
8#include <optional>
9
10namespace aligator {
11namespace gar {
12
13template <typename _Scalar> class RiccatiSolverBase {
14public:
15 using Scalar = _Scalar;
18
19 virtual bool backward(const Scalar mueq) = 0;
20
21 virtual bool
22 forward(std::vector<VectorXs> &xs, std::vector<VectorXs> &us,
23 std::vector<VectorXs> &vs, std::vector<VectorXs> &lbdas,
24 const std::optional<ConstVectorRef> &theta_ = std::nullopt) const = 0;
25
27 virtual void cycleAppend(const LqrKnot &knot) = 0;
28
32 virtual void collapseFeedback() {}
33 virtual VectorRef getFeedforward(size_t) = 0;
34 virtual RowMatrixRef getFeedback(size_t) = 0;
35
36 virtual ~RiccatiSolverBase() = default;
37};
38
39#ifdef ALIGATOR_ENABLE_TEMPLATE_INSTANTIATION
40extern template class RiccatiSolverBase<context::Scalar>;
41#endif
42} // namespace gar
43} // namespace aligator
virtual RowMatrixRef getFeedback(size_t)=0
virtual VectorRef getFeedforward(size_t)=0
virtual ~RiccatiSolverBase()=default
virtual 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 =0
virtual void cycleAppend(const LqrKnot &knot)=0
Cycle the solver data, given the specs from a given new knot.
virtual bool backward(const Scalar mueq)=0
Math utilities.
Main package namespace.
Struct describing a stage of a constrained LQ problem.