26 derivative(0) = state(1);
27 derivative(1) = control(0) -
kStiffness * state(0) + 0.1;
49 const double t = 0.0)
override 57 const double t = 0.0)
override 69 Eigen::Matrix<double, 2, 2> Q;
72 Eigen::Matrix<double, 1, 1> R;
75 Eigen::Matrix<double, 2, 1> x_nominal = x_final;
76 Eigen::Matrix<double, 1, 1> u_nominal;
79 Eigen::Matrix<double, 2, 2> Q_final;
80 Q_final << 10.0, 0, 0, 10.0;
82 std::shared_ptr<CostFunctionQuadratic<2, 1>> quadraticCostFunction(
85 return quadraticCostFunction;
state_matrix_t A_
Definition: SpringLoadedMass.h:43
void computeControlledDynamics(const core::StateVector< state_dim > &state, const core::Time &t, const core::ControlVector< control_dim > &control, core::StateVector< state_dim > &derivative) override
Definition: SpringLoadedMass.h:21
std::shared_ptr< CostFunctionQuadratic< 2, 1 > > createSpringLoadedMassCostFunction(const core::StateVector< 2 > &x_final)
Definition: SpringLoadedMass.h:67
ct::core::ControlVector< control_dim > u
Definition: LoadFromFileTest.cpp:21
A simple quadratic cost function.
Definition: CostFunctionQuadraticSimple.hpp:23
static constexpr double kStiffness
Definition: SpringLoadedMass.h:31
clear all close all load ct GNMSLog0 mat reformat t
Definition: gnmsPlot.m:6
static const size_t control_dim
Definition: SpringLoadedMass.h:18
Linear system class for the GNMS unit test.
Definition: SpringLoadedMass.h:35
const state_control_matrix_t & getDerivativeControl(const core::StateVector< state_dim > &x, const core::ControlVector< control_dim > &u, const double t=0.0) override
Definition: SpringLoadedMass.h:55
ct::core::StateVector< state_dim > x
Definition: LoadFromFileTest.cpp:20
const state_matrix_t & getDerivativeState(const core::StateVector< state_dim > &x, const core::ControlVector< control_dim > &u, const double t=0.0) override
Definition: SpringLoadedMass.h:47
SpringLoadedMass()
Definition: SpringLoadedMass.h:20
SpringLoadedMassLinear * clone() const override
Definition: SpringLoadedMass.h:63
Dynamics class for the GNMS unit test.
Definition: SpringLoadedMass.h:14
static const size_t state_dim
Definition: SpringLoadedMass.h:17
SpringLoadedMass * clone() const override
Definition: SpringLoadedMass.h:30
state_control_matrix_t B_
Definition: SpringLoadedMass.h:44