SCL
1.0
Standard Control Library : Control, dynamics, physics, and simulation
|
#include <CControllerBase.hpp>
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_ |
CDynamicsBase * | dynamics_ |
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.
|
inline |
The constructor sets the initialization state to false
|
inlinevirtual |
The destructor does nothing
|
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.
|
pure virtual |
Computes the dynamic model : Mass, MassInv, centrifugal/coriolis, gravity, null spaces etc.
Implemented in scl::CControllerMultiTask, and scl::CControllerGc.
|
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.
|
inlinevirtual |
Whether the controller has been attached to a robot or not
Reimplemented in scl::CControllerGc.
|
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.
|
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.