SCL  1.0
Standard Control Library : Control, dynamics, physics, and simulation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
scl::CControllerBase Class Referenceabstract

#include <CControllerBase.hpp>

Inheritance diagram for scl::CControllerBase:
Inheritance graph
Collaboration diagram for scl::CControllerBase:
Collaboration graph

Public Member Functions

 CControllerBase ()
virtual ~CControllerBase ()
virtual sBool computeControlForces ()=0
virtual sBool computeDynamics ()=0
virtual sBool computeNonControlOperations ()=0
virtual sBool init (SControllerBase *arg_data, scl::CDynamicsBase *arg_dynamics)=0
virtual sBool reset ()=0
virtual sBool hasBeenInit ()

Protected Attributes

sBool has_been_init_

Detailed Description

Basic force controller.

All force controllers should inherit from this.

Should be associated with a robot at initialization time. Else should be stateless. Ie. A CRobot object should be able to use this controller with any control data structure.

Constructor & Destructor Documentation

scl::CControllerBase::CControllerBase ( )

The constructor sets the initialization state to false

virtual scl::CControllerBase::~CControllerBase ( )

The destructor does nothing

Member Function Documentation

virtual sBool scl::CControllerBase::computeControlForces ( )
pure virtual

Equal to task forces or generalized coordinate forces depending on the type of controller that implements this API

Implemented in scl::CControllerMultiTask, and scl::CControllerGc.

virtual sBool scl::CControllerBase::computeDynamics ( )
pure virtual

Computes the dynamic model : Mass, MassInv, centrifugal/coriolis, gravity, null spaces etc.

Implemented in scl::CControllerMultiTask, and scl::CControllerGc.

virtual sBool scl::CControllerBase::computeNonControlOperations ( )
pure virtual

Support for non control computations in the controller. This is a good place to add error checks, logging, communication etc. Basically anything that doesn't require hard real-time and high-performance constratints.

Implemented in scl::CControllerMultiTask, and scl::CControllerGc.

virtual sBool scl::CControllerBase::hasBeenInit ( )

Whether the controller has been attached to a robot or not

Reimplemented in scl::CControllerGc.

virtual sBool scl::CControllerBase::init ( SControllerBase arg_data,
scl::CDynamicsBase arg_dynamics 
pure virtual

Whether the controller has been initialized to a particular robot

The controllers must implement their choice of "public" init function, which sets has_been_setup_ to true.

The public init must accept a subclass of SControllerBase as its (pre-initialized) data structure.

See CControllerGc's implementation for more details.

(has_been_setup_ == true) MUST BE a pre-requisite to running any controller.

Implemented in scl::CControllerMultiTask, and scl::CControllerGc.

virtual sBool scl::CControllerBase::reset ( )
pure virtual

Reset the controller (set it to execute a different behavior perhaps) NOTE : This does not reset the data structure or deallocate its memory because the data structure really should sit on a pile in the database

Implemented in scl::CControllerMultiTask, and scl::CControllerGc.

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