orogen/ctrl_lib
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
ctrl_lib::ControllerTask Class Referenceabstract

#include <ControllerTask.hpp>

Inheritance diagram for ctrl_lib::ControllerTask:

Public Member Functions

 ControllerTask (std::string const &name="ctrl_lib::ControllerTask")
 
 ControllerTask (std::string const &name, RTT::ExecutionEngine *engine)
 
 ~ControllerTask ()
 
bool configureHook ()
 
bool startHook ()
 
void updateHook ()
 
void errorHook ()
 
void stopHook ()
 
void cleanupHook ()
 

Protected Member Functions

virtual bool readFeedback ()=0
 
virtual bool readSetpoint ()=0
 
virtual void updateController ()=0
 
virtual const base::VectorXd & computeActivation (wbc::ActivationFunction &activation_function)=0
 

Protected Attributes

std::vector< std::string > field_names
 
wbc::ActivationFunction activation_function
 
base::VectorXd tmp
 
base::Time stamp
 

Friends

class ControllerTaskBase
 

Detailed Description

Base class for all controllers. Implements the controller state machine. Basic functionality is as follows:

  1. Update Properties
  2. Read Feedback term.
  3. If a feedback term is available, read setpoint. Once there is a setpoint, control output will be written at all times.
  1. Compute and write control output, depending on the implementation of the controller (derived task)
  2. Compute activation. The activation indicates how much influence a control output has, compared to the other control outputs. Activation values will be within 0..1. The activation ports can e.g. be connected to WBC in order to deactivate constraint variables and make unneeded dof available for other tasks. A typical example is Joint limits avoidance. Usually one wants to activate the avoidance behavior only when being close to the joint limits and not disturb other tasks when moving freely. Different activation functions can be chosen (e.g. linear, quadratic, ...) in order to achieve smooth transitions.

Constructor & Destructor Documentation

◆ ControllerTask() [1/2]

ControllerTask::ControllerTask ( std::string const & name = "ctrl_lib::ControllerTask")

◆ ControllerTask() [2/2]

ControllerTask::ControllerTask ( std::string const & name,
RTT::ExecutionEngine * engine )

◆ ~ControllerTask()

ctrl_lib::ControllerTask::~ControllerTask ( )
inline

Member Function Documentation

◆ cleanupHook()

void ControllerTask::cleanupHook ( )

◆ computeActivation()

virtual const base::VectorXd & ctrl_lib::ControllerTask::computeActivation ( wbc::ActivationFunction & activation_function)
protectedpure virtual

Compute Activation function

◆ configureHook()

bool ControllerTask::configureHook ( )

◆ errorHook()

void ControllerTask::errorHook ( )

◆ readFeedback()

virtual bool ctrl_lib::ControllerTask::readFeedback ( )
protectedpure virtual

Read all feedback values of the controller. Return false if there is no feedback, true otherwise

◆ readSetpoint()

virtual bool ctrl_lib::ControllerTask::readSetpoint ( )
protectedpure virtual

Read all setpoints of the controller. Return false if there is no setpoint, true otherwise

◆ startHook()

bool ControllerTask::startHook ( )

◆ stopHook()

void ControllerTask::stopHook ( )

◆ updateController()

virtual void ctrl_lib::ControllerTask::updateController ( )
protectedpure virtual

Compute output of the controller

◆ updateHook()

void ControllerTask::updateHook ( )

Friends And Related Symbol Documentation

◆ ControllerTaskBase

friend class ControllerTaskBase
friend

Member Data Documentation

◆ activation_function

wbc::ActivationFunction ctrl_lib::ControllerTask::activation_function
protected

◆ field_names

std::vector<std::string> ctrl_lib::ControllerTask::field_names
protected

◆ stamp

base::Time ctrl_lib::ControllerTask::stamp
protected

◆ tmp

base::VectorXd ctrl_lib::ControllerTask::tmp
protected

The documentation for this class was generated from the following files: