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_ 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)
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_
Generic interface class for discretization grids.
#define FACTORY_REGISTER_STAGE_COST(type)
A matrix or vector expression mapping an existing expression.
virtual bool isZero() const
Interface class for reference trajectories.
std::shared_ptr< StagePreprocessor > Ptr
std::shared_ptr< StageCost > Ptr