Quadratic state running cost (specialized for SE2) More...
#include <quadratic_cost_se2.h>

Public Types | |
| using | Ptr = std::shared_ptr< QuadraticStateCostSE2 > |
Public Types inherited from corbo::StageCost | |
| typedef std::shared_ptr< const StageCost > | ConstPtr |
| typedef std::shared_ptr< StageCost > | Ptr |
Public Types inherited from corbo::StageFunction | |
| typedef std::shared_ptr< const StageFunction > | ConstPtr |
| typedef std::shared_ptr< StageFunction > | Ptr |
Public Member Functions | |
| void | computeIntegralStateControlTerm (int k, const Eigen::Ref< const Eigen::VectorXd > &x_k, const Eigen::Ref< const Eigen::VectorXd > &u_k, Eigen::Ref< Eigen::VectorXd > cost) const override |
| void | computeNonIntegralStateTerm (int k, const Eigen::Ref< const Eigen::VectorXd > &x_k, Eigen::Ref< Eigen::VectorXd > cost) const override |
| corbo::StageCost::Ptr | getInstance () const override |
| QuadraticStateCostSE2 () | |
| Default constructor. More... | |
| QuadraticStateCostSE2 (const Eigen::Ref< const Eigen::MatrixXd > &Q, bool integral_form=false, bool lsq_form=false) | |
| Construct with weight matrices. More... | |
Public Member Functions inherited from corbo::QuadraticStateCost | |
| bool | checkParameters (int state_dim, int control_dim, std::stringstream *issues) const override |
| int | getIntegralStateControlTermDimension (int k) const override |
| int | getNonIntegralStateTermDimension (int k) const override |
| bool | hasIntegralTerms (int k) const override |
| bool | hasNonIntegralTerms (int k) const override |
| bool | isLsqFormNonIntegralStateTerm (int k) const override |
| QuadraticStateCost () | |
| QuadraticStateCost (const Eigen::Ref< const Eigen::MatrixXd > &Q, bool integral_form, bool lsq_form=false) | |
| void | setIntegralForm (bool integral_form) |
| void | setLsqForm (bool lsq_form) |
| bool | setWeightQ (const Eigen::DiagonalMatrix< double, -1 > &Q) |
| bool | setWeightQ (const Eigen::Ref< const Eigen::MatrixXd > &Q) |
| bool | update (int n, double t, ReferenceTrajectoryInterface &xref, ReferenceTrajectoryInterface &uref, ReferenceTrajectoryInterface *sref, bool single_dt, const Eigen::VectorXd &x0, StagePreprocessor::Ptr stage_preprocessor, const std::vector< double > &dts, const DiscretizationGridInterface *) override |
Public Member Functions inherited from corbo::StageFunction | |
| virtual void | computeConcatenatedNonIntegralStateControlTerms (int k, const Eigen::Ref< const Eigen::VectorXd > &x_k, const Eigen::Ref< const Eigen::VectorXd > &u_k, double dt_k, Eigen::Ref< Eigen::VectorXd > cost, bool lsq_mode=false) const |
| virtual void | computeConcatenatedNonIntegralStateTerms (int k, const Eigen::Ref< const Eigen::VectorXd > &x_k, const Eigen::Ref< const Eigen::VectorXd > &u_k, double dt_k, Eigen::Ref< Eigen::VectorXd > cost, bool lsq_mode=false) const |
| virtual void | computeNonIntegralControlDeviationTerm (int k, const Eigen::Ref< const Eigen::VectorXd > &u_k, const Eigen::Ref< const Eigen::VectorXd > &u_prev, double dt_prev, Eigen::Ref< Eigen::VectorXd > cost) const |
| virtual void | computeNonIntegralControlTerm (int k, const Eigen::Ref< const Eigen::VectorXd > &u_k, Eigen::Ref< Eigen::VectorXd > cost) const |
| virtual void | computeNonIntegralDtTerm (int k, double dt, Eigen::Ref< Eigen::VectorXd > cost) const |
| virtual void | computeNonIntegralStateControlDtTerm (int k, const Eigen::Ref< const Eigen::VectorXd > &x_k, const Eigen::Ref< const Eigen::VectorXd > &u_k, double dt_k, Eigen::Ref< Eigen::VectorXd > cost) const |
| virtual void | computeNonIntegralStateControlTerm (int k, const Eigen::Ref< const Eigen::VectorXd > &x_k, const Eigen::Ref< const Eigen::VectorXd > &u_k, Eigen::Ref< Eigen::VectorXd > cost) const |
| virtual void | computeNonIntegralStateDtTerm (int k, const Eigen::Ref< const Eigen::VectorXd > &x_k, double dt_k, Eigen::Ref< Eigen::VectorXd > cost) const |
| virtual int | getConcatenatedNonIntegralStateControlTermDimension (int k, bool lsq_mode=false) const |
| virtual int | getConcatenatedNonIntegralStateTermDimension (int k, bool lsq_mode=false) const |
| virtual int | getNonIntegralControlDeviationTermDimension (int k) const |
| virtual int | getNonIntegralControlTermDimension (int k) const |
| virtual int | getNonIntegralDtTermDimension (int k) const |
| virtual int | getNonIntegralStateControlDtTermDimension (int k) const |
| virtual int | getNonIntegralStateControlTermDimension (int k) const |
| virtual int | getNonIntegralStateDtTermDimension (int k) const |
| virtual bool | isLinearNonIntegralControlTerm (int k) const |
| virtual bool | isLinearNonIntegralDtTerm (int k) const |
| virtual bool | isLinearNonIntegralStateTerm (int k) const |
| virtual bool | isLsqFormNonIntegralControlTerm (int k) const |
| virtual bool | isLsqFormNonIntegralDtTerm (int k) const |
| virtual | ~StageFunction ()=default |
Additional Inherited Members | |
Protected Attributes inherited from corbo::QuadraticStateCost | |
| bool | _diagonal_mode |
| bool | _diagonal_mode_intentionally |
| bool | _integral_form |
| bool | _lsq_form |
| Eigen::MatrixXd | _Q |
| Eigen::DiagonalMatrix< double, -1 > | _Q_diag |
| Eigen::DiagonalMatrix< double, -1 > | _Q_diag_sqrt |
| Eigen::MatrixXd | _Q_sqrt |
| const ReferenceTrajectoryInterface * | _x_ref |
| bool | _zero_x_ref |
Quadratic state running cost (specialized for SE2)
This class implements quadratic state running costs
However, this class ensures that the state distance (x_{ref} - x) is computed properly in SO(2) for the third state component.
Note, the class also provides a least squares form if not in integral form which is:
is computed once using the cholesky decomposition. This form is later squared by the solver.
Definition at line 126 of file quadratic_cost_se2.h.
| using mpc_local_planner::QuadraticStateCostSE2::Ptr = std::shared_ptr<QuadraticStateCostSE2> |
Definition at line 129 of file quadratic_cost_se2.h.
|
inline |
Default constructor.
Definition at line 132 of file quadratic_cost_se2.h.
|
inline |
Construct with weight matrices.
| [in] | Q | Positive definite state weighting matrix (must match dimensions!) |
| [in] | integral_form | If true, the running costs are later integrated over the grid interval, otherwise, the values are just summed up as in sampled-data MPC. |
| [in] | lsq_form | Set to true in order to prefer the least-squares form |
Definition at line 142 of file quadratic_cost_se2.h.
|
overridevirtual |
Reimplemented from corbo::QuadraticStateCost.
Definition at line 129 of file quadratic_cost_se2.cpp.
|
overridevirtual |
Reimplemented from corbo::QuadraticStateCost.
Definition at line 106 of file quadratic_cost_se2.cpp.
|
inlineoverridevirtual |
Reimplemented from corbo::QuadraticStateCost.
Definition at line 148 of file quadratic_cost_se2.h.