SCL
1.0
Standard Control Library : Control, dynamics, physics, and simulation
|
#include <CActuatorBase.hpp>
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_ |
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.
|
inline |
Default constructor. Sets stuff to NULL
|
inlinevirtual |
Default destructor. Frees memory
|
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; }
|
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.
|
pure virtual |
Does this actuator actuate the generalized coordinates? If so, the computeJacobian function is not used.
|
pure virtual |
Has this actuator been initialized
|
pure virtual |
All actutors must be initialized
|
protected |
The subclass must set this during the initialization call.