jspace::Controller Class Reference

#include <Controller.hpp>

Inheritance diagram for jspace::Controller:

Inheritance graph
[legend]
Collaboration diagram for jspace::Controller:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Controller ()
virtual ~Controller ()
virtual
controller_info_getter_s const * 
getInfo () const
 Provides a hook for retrieving specialized DOF and gain names, if provided.
virtual Status init (Model const &model)
 Default init just returns ok.
virtual Status setGoal (Vector const &goal)=0
virtual Status getGoal (Vector &goal) const =0
virtual Status getActual (Vector &actual) const =0
virtual Status setGains (Vector const &kp, Vector const &kd)=0
virtual Status getGains (Vector &kp, Vector &kd) const =0
virtual Status latch (Model const &model)=0
 This method is supposed to be called just before the first call to computeCommand(), in order to allow the controller to set the goal to the current state.
virtual Status computeCommand (Model const &model, Vector &tau)=0

Protected Attributes

jspace_controller_info_getter_sinfo_getter_


Detailed Description

Definition at line 59 of file Controller.hpp.


Constructor & Destructor Documentation

jspace::Controller::Controller (  ) 

Definition at line 84 of file Controller.cpp.

jspace::Controller::~Controller (  )  [virtual]

Definition at line 91 of file Controller.cpp.

References info_getter_.


Member Function Documentation

controller_info_getter_s const * jspace::Controller::getInfo (  )  const [virtual]

Provides a hook for retrieving specialized DOF and gain names, if provided.

Specific Controller subclasses can override this method in order to inform higher levels about how to refer to the degrees of freedom etc. Useful mostly for operational space controllers.

Note:
The default is to construct a jspace_controller_info_getter_s on the fly and return that. The Controller destructor will clean it up.
Returns:
A pointer to a (custom) controller_info_getter_s or NULL (i.e. we cannot construct the info getter before init() has been called).

Definition at line 98 of file Controller.cpp.

References info_getter_.

virtual Status jspace::Controller::init ( Model const &  model  )  [inline, virtual]

Default init just returns ok.

You should only call this with a fully initialized model, because controllers might need to inspect the state.

Reimplemented in jspace::GoalControllerBase.

Definition at line 84 of file Controller.hpp.

virtual Status jspace::Controller::setGoal ( Vector const &  goal  )  [pure virtual]

Implemented in jspace::FloatController, and jspace::GoalControllerBase.

virtual Status jspace::Controller::getGoal ( Vector goal  )  const [pure virtual]

Implemented in jspace::FloatController, and jspace::GoalControllerBase.

virtual Status jspace::Controller::getActual ( Vector actual  )  const [pure virtual]

Implemented in jspace::FloatController, and jspace::JointGoalController.

virtual Status jspace::Controller::setGains ( Vector const &  kp,
Vector const &  kd 
) [pure virtual]

Implemented in jspace::FloatController, and jspace::GoalControllerBase.

virtual Status jspace::Controller::getGains ( Vector kp,
Vector kd 
) const [pure virtual]

Implemented in jspace::FloatController, and jspace::GoalControllerBase.

virtual Status jspace::Controller::latch ( Model const &  model  )  [pure virtual]

This method is supposed to be called just before the first call to computeCommand(), in order to allow the controller to set the goal to the current state.

This is important for applications where we switch controllers at runtime.

Implemented in jspace::FloatController, and jspace::JointGoalController.

virtual Status jspace::Controller::computeCommand ( Model const &  model,
Vector tau 
) [pure virtual]

Implemented in jspace::FloatController, and jspace::JointGoalController.


Member Data Documentation

jspace_controller_info_getter_s* jspace::Controller::info_getter_ [mutable, protected]

Definition at line 102 of file Controller.hpp.

Referenced by getInfo(), and ~Controller().


The documentation for this class was generated from the following files:
Generated on Fri Aug 26 01:32:35 2011 for Stanford Whole-Body Control Framework by  doxygen 1.5.4