|
orwell 0.0.0
|
base class for controller implementation More...
#include <Controller.hpp>
Public Member Functions | |
| Controller (const sackmesser::Interface::Ptr &interface, const std::string &name) | |
| loads configuration parameters | |
| RobotState< dof >::Vector | getControlCommand (const RobotState< dof > &robot_state) |
| general function to obtain control commands | |
| void | setRobotModel (const typename RobotModel< dof >::Ptr &robot_model) |
| set the RobotModel | |
| void | setStoppingCriterion (const std::shared_ptr< StoppingCriterion< dof > > &stopping_criterion) |
| (optional) StoppingCriterion | |
| bool | isFinished (const RobotState< dof > &robot_state) const |
| check if the StoppingCriterion is fulfilled | |
| template<class Derived > | |
| Derived::Ptr | cast () |
| cast Controller to a derived class | |
Protected Member Functions | |
| virtual RobotState< dof >::Vector | computeCommand ()=0 |
| will be invoked when calling getControlCommand | |
| RobotModel< dof >::Ptr | getRobotModel () |
| proved access to the RobotModel to derived classes | |
| const RobotState< dof > & | getRobotState () const |
| proved access to the RobotState to derived classes | |
Friends | |
| template<int , template< int > class> | |
| class | ParallelController |
base class for controller implementation
| dof | number of degrees of freedom of the controlled system |
Definition at line 41 of file Controller.hpp.
| orwell::Controller< dof >::Controller | ( | const sackmesser::Interface::Ptr & | interface, |
| const std::string & | name ) |
loads configuration parameters
| interface | interfaces the configuration server |
| name | parameter namespace |
Definition at line 30 of file Controller.hxx.
cast Controller to a derived class
expects the derived class to declare a typedef called Ptr
| Derived | derived class type |
Definition at line 81 of file Controller.hxx.
|
protectedpure virtual |
will be invoked when calling getControlCommand
actual computation of the control command depending on the derived class
Implemented in orwell::CompliantController< dof >, orwell::PositionController< dof >, and orwell::VelocityController< dof >.
Referenced by orwell::Controller< dof >::getControlCommand().
| RobotState< dof >::Vector orwell::Controller< dof >::getControlCommand | ( | const RobotState< dof > & | robot_state | ) |
general function to obtain control commands
| robot_state | current RobotState |
Definition at line 87 of file Controller.hxx.
References orwell::Controller< dof >::computeCommand(), and orwell::Controller< dof >::getRobotModel().
|
protected |
proved access to the RobotModel to derived classes
Definition at line 51 of file Controller.hxx.
Referenced by orwell::Controller< dof >::getControlCommand().
|
protected |
proved access to the RobotState to derived classes
Definition at line 97 of file Controller.hxx.
| bool orwell::Controller< dof >::isFinished | ( | const RobotState< dof > & | robot_state | ) | const |
check if the StoppingCriterion is fulfilled
| robot_state | current RobotState |
Definition at line 69 of file Controller.hxx.
| void orwell::Controller< dof >::setRobotModel | ( | const typename RobotModel< dof >::Ptr & | robot_model | ) |
set the RobotModel
since the RobotModel is implemented as a base class, this function allows the usage of different kinematics/dynamics libraries
| robot_model | RobotModel the model of the robot to compute kinematics/dynamics |
Definition at line 57 of file Controller.hxx.
Referenced by orwell::ControllerManager< dof >::ControllerManager().
| void orwell::Controller< dof >::setStoppingCriterion | ( | const std::shared_ptr< StoppingCriterion< dof > > & | stopping_criterion | ) |
(optional) StoppingCriterion
can be checked via the function isFinished
| stopping_criterion | StoppingCriterion |
Definition at line 63 of file Controller.hxx.
Definition at line 163 of file Controller.hpp.