27 : uff_(uff), kp_(kp), kd_(kd)
47 controlAction(0) -= kp_ * state(0) + kd_ * state(1);
an example controller class that takes a 2-dimensional state and outputs a 1-dimensional control acti...
Definition: CustomController.h:16
static const size_t state_dim
Definition: CustomController.h:19
CustomController(const CustomController &other)
copy constructor
Definition: CustomController.h:34
static const size_t control_dim
Definition: CustomController.h:20
CustomController * clone() const override
clone method, needs to be implemented, overrides ct::core::Controller::clone()
Definition: CustomController.h:36
void computeControl(const ct::core::StateVector< state_dim > &state, const double &t, ct::core::ControlVector< control_dim > &controlAction) override
override the compute control method with a custom control law
Definition: CustomController.h:42
Definition: StateVector.h:12
~CustomController()
destructor
Definition: CustomController.h:32
CustomController(const ct::core::ControlVector< control_dim > &uff, const double &kp, const double &kd)
default constructor
Definition: CustomController.h:23
Interface class for all controllers.
Definition: Controller.h:26