Go to the documentation of this file.
25 #ifndef SRC_OPTIMAL_CONTROL_INCLUDE_CORBO_OPTIMAL_CONTROL_FUNCTIONS_QUADRATIC_COST_H_
26 #define SRC_OPTIMAL_CONTROL_INCLUDE_CORBO_OPTIMAL_CONTROL_FUNCTIONS_QUADRATIC_COST_H_
35 class QuadraticFormCost :
public StageCost
38 using Ptr = std::shared_ptr<QuadraticFormCost>;
42 _Q_sqrt = Eigen::MatrixXd::Constant(1, 1, 1);
43 _R_sqrt = Eigen::MatrixXd::Constant(1, 1, 1);
47 bool lsq_form =
false)
81 bool update(
int n,
double t, ReferenceTrajectoryInterface& xref, ReferenceTrajectoryInterface& uref, ReferenceTrajectoryInterface* sref,
82 bool single_dt,
const Eigen::VectorXd& x0,
StagePreprocessor::Ptr stage_preprocessor,
const std::vector<double>& dts,
94 bool checkParameters(
int state_dim,
int control_dim, std::stringstream* issues)
const override;
102 #ifdef MESSAGE_SUPPORT
103 virtual bool fromMessage(
const messages::QuadraticFormCost& message, std::stringstream* issues);
104 virtual void toMessage(messages::QuadraticFormCost& message)
const;
106 bool fromMessage(
const messages::StageCost& message, std::stringstream* issues)
override
108 return fromMessage(message.quadratic_form_cost(), issues);
110 void toMessage(messages::StageCost& message)
const override { toMessage(*message.mutable_quadratic_form_cost()); }
139 #endif // SRC_OPTIMAL_CONTROL_INCLUDE_CORBO_OPTIMAL_CONTROL_FUNCTIONS_QUADRATIC_COST_H_
std::shared_ptr< StagePreprocessor > Ptr
Interface class for reference trajectories.
virtual bool isZero() const
std::shared_ptr< StageCost > Ptr
#define FACTORY_REGISTER_STAGE_COST(type)
A matrix or vector expression mapping an existing expression.
Generic interface class for discretization grids.
control_box_rst
Author(s): Christoph Rösmann
autogenerated on Wed Mar 2 2022 00:06:08