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::CActuatorBase Class Referenceabstract

#include <CActuatorBase.hpp>

Collaboration diagram for scl::CActuatorBase:
Collaboration graph

Public Member Functions

virtual sBool actuate (const std::vector< sFloat > &arg_input, Eigen::VectorXd &ret_output_gc_force)=0
virtual sBool computeJacobian ()=0
virtual sBool getActuatesGC ()=0
virtual sBool init (SActuatorSettings *arg_state)=0
virtual sBool hasBeenInit ()=0
 CActuatorBase ()
virtual ~CActuatorBase ()

Protected Attributes

SActuatorSettings settings_

Detailed Description

This will serve as the base class for a variety of actuator models.

The typical pipeline for an scl simulation is { Controller } -> { { Actuator } -> { Dynamics Engine } }

The logical breakdown for picking such a system is that while a controller might not be tied down to particular hardware, an actuator set typically is. Next, all hardware are constrained to obey the laws of physics.

Why pick this breakdown? Ans: One alternative formulation would have been to include the actuator model in the dynamics engine. Doing so, however, makes the dynamics engine very inflexible and less modular than it is otherwise.

The second alternative formulation would have been to include the actuator model into the controller. However, this would prevent something as general as an op-point controller from generalizing across a musculoskeletal system and a Puma robot.

Logical breakdown: { Robot-aware/agnostic Math } -> { Robot-specific Physical Properties } -> { Robot-agnostic Physics Laws }

NOTE : Please don't be confused. This is an actuator "model", and as these functions make sense for a simulated actuator. It is "NOT" meant as an interface to a real actuator.

DO NOT subclass this base and start writing a driver in it.

Constructor & Destructor Documentation

scl::CActuatorBase::CActuatorBase ( )

Default constructor. Sets stuff to NULL

virtual scl::CActuatorBase::~CActuatorBase ( )

Default destructor. Frees memory

Member Function Documentation

virtual sBool scl::CActuatorBase::actuate ( const std::vector< sFloat > &  arg_input,
Eigen::VectorXd &  ret_output_gc_force 
pure virtual

Convenience function that combines an actuator's functions

A typical implementation might split this function into three stages: { bool flag=true; flag = flag && setActuatorCommand(arg_input); flag = flag && applyActuatorModel(); flag = flag && getActuatorOutput(ret_output_gc); return flag; }

virtual sBool scl::CActuatorBase::computeJacobian ( )
pure virtual

Some actuator sets don't directly actuate the generalized coordinates and require a Jacobian to compute their contribution to the generalized forces.

Each actuator instance must implement this.

virtual sBool scl::CActuatorBase::getActuatesGC ( )
pure virtual

Does this actuator actuate the generalized coordinates? If so, the computeJacobian function is not used.

virtual sBool scl::CActuatorBase::hasBeenInit ( )
pure virtual

Has this actuator been initialized

virtual sBool scl::CActuatorBase::init ( SActuatorSettings arg_state)
pure virtual

All actutors must be initialized

Member Data Documentation

SActuatorSettings scl::CActuatorBase::settings_

The subclass must set this during the initialization call.

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