24#include <sackmesser/FactoryClass.hpp>
25#include <sackmesser/Interface.hpp>
27#include <orwell/RobotModel.hpp>
28#include <orwell/RobotState.hpp>
29#include <orwell/StoppingCriterion.hpp>
41 class Controller :
public std::enable_shared_from_this<Controller<dof>>
51 Controller(
const sackmesser::Interface::Ptr &interface,
const std::string &name);
99 template <
class Derived>
100 typename Derived::Ptr
cast();
145 struct Configuration :
public sackmesser::Configuration
151 bool load(
const std::string &ns,
const std::shared_ptr<sackmesser::Configurations> &server);
158 std::shared_ptr<StoppingCriterion<dof>> stopping_criterion_;
162 template <
int,
template <
int>
class>
168#include <orwell/Controller.hxx>
base class for controller implementation
RobotState< dof >::Vector getControlCommand(const RobotState< dof > &robot_state)
general function to obtain control commands
bool isFinished(const RobotState< dof > &robot_state) const
check if the StoppingCriterion is fulfilled
const RobotState< dof > & getRobotState() const
proved access to the RobotState to derived classes
RobotModel< dof >::Ptr getRobotModel()
proved access to the RobotModel to derived classes
Derived::Ptr cast()
cast Controller to a derived class
void setRobotModel(const typename RobotModel< dof >::Ptr &robot_model)
set the RobotModel
virtual RobotState< dof >::Vector computeCommand()=0
will be invoked when calling getControlCommand
Controller(const sackmesser::Interface::Ptr &interface, const std::string &name)
loads configuration parameters
void setStoppingCriterion(const std::shared_ptr< StoppingCriterion< dof > > &stopping_criterion)
(optional) StoppingCriterion
invokes several controllers in parallel and combines their control command
std::shared_ptr< RobotModel > Ptr
typedef
Eigen::Vector< double, dof > Vector
typedef
base class for a stopping criterion for a Controller