robotoc
robotoc - efficient ROBOT Optimal Control solvers
Loading...
Searching...
No Matches
unconstr_riccati_recursion.hpp
Go to the documentation of this file.
1#ifndef ROBOTOC_UNCONSTR_RICCATI_RECURSION_HPP_
2#define ROBOTOC_UNCONSTR_RICCATI_RECURSION_HPP_
3
4#include <vector>
5
6#include "Eigen/Core"
7
12#include "robotoc/ocp/ocp.hpp"
16
17
18namespace robotoc {
19
25using UnconstrRiccatiFactorization = std::vector<SplitRiccatiFactorization>;
26
33public:
39
44
49
54
59
64
68 UnconstrRiccatiRecursion& operator=(UnconstrRiccatiRecursion&&) noexcept = default;
69
76 void backwardRiccatiRecursion(KKTMatrix& kkt_matrix, KKTResidual& kkt_residual,
77 UnconstrRiccatiFactorization& factorization);
78
85 void forwardRiccatiRecursion(const KKTResidual& kkt_residual,
86 const UnconstrRiccatiFactorization& factorization,
87 Direction& d) const;
88
93 const std::vector<LQRPolicy>& getLQRPolicy() const;
94
95private:
96 int N_;
97 double dt_;
98 UnconstrRiccatiFactorizer factorizer_;
99 std::vector<LQRPolicy> lqr_policy_;
100
101};
102
103} // namespace robotoc
104
105#endif // ROBOTOC_UNCONSTR_RICCATI_RECURSION_HPP_
The state feedback and feedforward policy of LQR subproblem at a time stage.
Definition: lqr_policy.hpp:16
Riccati factorizer for a time stage.
Definition: unconstr_riccati_factorizer.hpp:25
Riccati recursion solver for optimal control problems of unconstrained rigid-body systems.
Definition: unconstr_riccati_recursion.hpp:32
UnconstrRiccatiRecursion(const OCP &ocp)
Construct a Riccati recursion solver.
const std::vector< LQRPolicy > & getLQRPolicy() const
Gets of the LQR policies over the horizon.
UnconstrRiccatiRecursion(UnconstrRiccatiRecursion &&) noexcept=default
Default move constructor.
~UnconstrRiccatiRecursion()=default
Default destructor.
UnconstrRiccatiRecursion(const UnconstrRiccatiRecursion &)=default
Default copy constructor.
UnconstrRiccatiRecursion()
Default constructor.
void forwardRiccatiRecursion(const KKTResidual &kkt_residual, const UnconstrRiccatiFactorization &factorization, Direction &d) const
Performs the forward Riccati recursion and computes the direction.
UnconstrRiccatiRecursion & operator=(const UnconstrRiccatiRecursion &)=default
Default copy operator.
void backwardRiccatiRecursion(KKTMatrix &kkt_matrix, KKTResidual &kkt_residual, UnconstrRiccatiFactorization &factorization)
Performs the backward Riccati recursion.
Definition: constraint_component_base.hpp:17
std::vector< SplitRiccatiFactorization > UnconstrRiccatiFactorization
Riccati factorization matices of the LQR subproblem for the unconstrained optimal control problem.
Definition: unconstr_riccati_recursion.hpp:25
aligned_vector< SplitKKTMatrix > KKTMatrix
The KKT matrix of the optimal control problem.
Definition: kkt_matrix.hpp:16
aligned_vector< SplitDirection > Direction
Newton direction of the solution to the optimal control problem.
Definition: direction.hpp:16
aligned_vector< SplitKKTResidual > KKTResidual
The KKT residual of the optimal control problem.
Definition: kkt_residual.hpp:16
The optimal control problem.
Definition: ocp.hpp:22