17 template <
class SensorDataType,
class GoalType,
class ControlType>
27 virtual bool run(SensorDataType sensor_data, ControlType &control) {
47 virtual void setGoal(GoalType goal) { goal_ = goal; }
52 virtual GoalType
getGoal()
const {
return goal_; }
68 ControlType &control) = 0;
Base Controller class.
Definition: base_controller.h:18
virtual void setGoal(GoalType goal)
set the goal condition for the controller. Should use internal locking as the run function can be cal...
Definition: base_controller.h:47
ControllerStatus isConverged(SensorDataType sensor_data)
Check if controller is converged.
Definition: base_controller.h:39
virtual ControllerStatus isConvergedImplementation(SensorDataType sensor_data, GoalType goal)=0
Implementation for checking convergence to be implemented by subclasses. This function is called afte...
Status of the controller.
Definition: controller_status.h:10
virtual bool runImplementation(SensorDataType sensor_data, GoalType goal, ControlType &control)=0
Run the control loop and return control arguments.
virtual ~Controller()
Destructor.
Definition: base_controller.h:56
virtual GoalType getGoal() const
get the goal condition for the controller. Should use internal locking as the run function can be cal...
Definition: base_controller.h:52
virtual bool run(SensorDataType sensor_data, ControlType &control)
Run the control loop and return control arguments.
Definition: base_controller.h:27