Base class for an actuator (e.g., a torque motor, muscle, . More...
#include <Actuator.h>
Public Member Functions | |
Actuator_ () | |
Construct an actuator of controls. | |
Actuator_ (const Actuator_ &aActuator) | |
Copy constructor. | |
virtual | ~Actuator_ () |
Destructor. | |
virtual Object * | copy () const =0 |
Construct and return a copy of this object. | |
Actuator_ & | operator= (const Actuator_ &aActuator) |
Assignment operator. | |
virtual int | numControls () const =0 |
virtual const SimTK::Vector | getDefaultControls () |
Actuator default controls are zero. | |
virtual const SimTK::VectorView_< double > | getControls (const SimTK::State &s) const |
Get the actuator's control values. | |
virtual void | getControls (const SimTK::Vector &modelControls, SimTK::Vector &actuatorControls) const |
Convenience methods for getting, setting and adding to actuator controls from/into the model controls. | |
virtual void | setControls (const SimTK::Vector &actuatorControls, SimTK::Vector &modelControls) const |
set actuator controls subvector into the right slot in the system-wide model controls | |
virtual void | addInControls (const SimTK::Vector &actuatorControls, SimTK::Vector &modelControls) const |
add actuator controls to the values already occupying the slot in the system-wide model controls | |
virtual double | computeActuation (const SimTK::State &s) const =0 |
virtual void | computeEquilibrium (SimTK::State &s) const |
Protected Member Functions | |
virtual void | setup (Model &aModel) |
Perform set up functions after model has been deserialized or copied. | |
virtual void | createSystem (SimTK::MultibodySystem &system) const |
Default is to create a ForceAdapter which is a SimTK::Force::Custom as the udnerlying computational component. | |
virtual void | initState (SimTK::State &state) const |
This is called after a SimTK System and State have been created for the Model. | |
virtual void | setDefaultsFromState (const SimTK::State &state) |
Set all default values for this object to match those in a specified State. | |
virtual void | updateGeometry () |
Update the geometric representation of the Actuator if any. | |
Protected Attributes | |
int | _controlIndex |
Base class for an actuator (e.g., a torque motor, muscle, .
..) that requires external input (controls) to generate force.
Actuator_::Actuator_ | ( | ) |
Construct an actuator of controls.
Actuator_::Actuator_ | ( | const Actuator_ & | aAct | ) |
Copy constructor.
aActuator | Actuator to copy. |
Actuator_::~Actuator_ | ( | ) | [virtual] |
Destructor.
virtual void OpenSim::Actuator_::addInControls | ( | const SimTK::Vector & | actuatorControls, | |
SimTK::Vector & | modelControls | |||
) | const [virtual] |
add actuator controls to the values already occupying the slot in the system-wide model controls
virtual double OpenSim::Actuator_::computeActuation | ( | const SimTK::State & | s | ) | const [pure virtual] |
Implemented in OpenSim::ContDerivMuscle, OpenSim::CoordinateActuator, OpenSim::Delp1990Muscle, OpenSim::PointActuator, OpenSim::PointToPointActuator, OpenSim::RigidTendonMuscle, OpenSim::Schutte1993Muscle, OpenSim::Thelen2003Muscle, OpenSim::TorqueActuator, OpenSim::ActivationFiberLengthMuscle, OpenSim::Muscle, and OpenSim::PathActuator.
virtual void OpenSim::Actuator_::computeEquilibrium | ( | SimTK::State & | s | ) | const [inline, virtual] |
Reimplemented in OpenSim::ContDerivMuscle, OpenSim::Delp1990Muscle, OpenSim::Schutte1993Muscle, and OpenSim::Thelen2003Muscle.
virtual Object* OpenSim::Actuator_::copy | ( | ) | const [pure virtual] |
Construct and return a copy of this object.
The object is allocated using the new operator, so the caller is responsible for deleting the returned object.
Implements OpenSim::Force.
Implemented in OpenSim::ContDerivMuscle, OpenSim::CoordinateActuator, OpenSim::Delp1990Muscle, OpenSim::PointActuator, OpenSim::PointToPointActuator, OpenSim::RigidTendonMuscle, OpenSim::Schutte1993Muscle, OpenSim::Thelen2003Muscle, OpenSim::TorqueActuator, OpenSim::ActivationFiberLengthMuscle, OpenSim::Actuator, OpenSim::Muscle, and OpenSim::PathActuator.
void Actuator_::createSystem | ( | SimTK::MultibodySystem & | system | ) | const [protected, virtual] |
Default is to create a ForceAdapter which is a SimTK::Force::Custom as the udnerlying computational component.
Create an underlying SimTK::Force to represent the OpenSim::Force in the computational system.
Subclasses override to employ other SimTK::Forces.
Create a SimTK::Force::Custom by default.
Reimplemented from OpenSim::Force.
Reimplemented in OpenSim::ContDerivMuscle, OpenSim::CoordinateActuator, OpenSim::Delp1990Muscle, OpenSim::RigidTendonMuscle, OpenSim::Schutte1993Muscle, OpenSim::Thelen2003Muscle, OpenSim::ActivationFiberLengthMuscle, OpenSim::Actuator, OpenSim::Muscle, and OpenSim::PathActuator.
virtual void OpenSim::Actuator_::getControls | ( | const SimTK::Vector & | modelControls, | |
SimTK::Vector & | actuatorControls | |||
) | const [virtual] |
Convenience methods for getting, setting and adding to actuator controls from/into the model controls.
These methods have no effect on the realization stage.
const VectorView_< Real > Actuator_::getControls | ( | const SimTK::State & | s | ) | const [virtual] |
Get the actuator's control values.
the | current state |
virtual const SimTK::Vector OpenSim::Actuator_::getDefaultControls | ( | ) | [inline, virtual] |
Actuator default controls are zero.
void Actuator_::initState | ( | SimTK::State & | state | ) | const [protected, virtual] |
This is called after a SimTK System and State have been created for the Model.
It must be implementd to set initial values of state variables.
state | the State to initialize |
Reimplemented from OpenSim::Force.
Reimplemented in OpenSim::RigidTendonMuscle, OpenSim::ActivationFiberLengthMuscle, OpenSim::Actuator, and OpenSim::Muscle.
virtual int OpenSim::Actuator_::numControls | ( | ) | const [pure virtual] |
Implemented in OpenSim::Actuator.
Assignment operator.
Reimplemented from OpenSim::Force.
Reimplemented in OpenSim::ContDerivMuscle, OpenSim::CoordinateActuator, OpenSim::Delp1990Muscle, OpenSim::PointActuator, OpenSim::PointToPointActuator, OpenSim::RigidTendonMuscle, OpenSim::Schutte1993Muscle, OpenSim::Thelen2003Muscle, OpenSim::TorqueActuator, OpenSim::ActivationFiberLengthMuscle, OpenSim::Actuator, OpenSim::Muscle, and OpenSim::PathActuator.
virtual void OpenSim::Actuator_::setControls | ( | const SimTK::Vector & | actuatorControls, | |
SimTK::Vector & | modelControls | |||
) | const [virtual] |
set actuator controls subvector into the right slot in the system-wide model controls
void Actuator_::setDefaultsFromState | ( | const SimTK::State & | state | ) | [protected, virtual] |
Set all default values for this object to match those in a specified State.
It must be implemented/overriden to set any default values defined by each subclass.
state | the State from which to take values that should become the defaults for this object |
Reimplemented from OpenSim::Force.
Reimplemented in OpenSim::RigidTendonMuscle, OpenSim::ActivationFiberLengthMuscle, OpenSim::Actuator, and OpenSim::Muscle.
void Actuator_::setup | ( | Model & | aModel | ) | [protected, virtual] |
Perform set up functions after model has been deserialized or copied.
aModel | model containing this actuator. |
Reimplemented from OpenSim::Force.
Reimplemented in OpenSim::ContDerivMuscle, OpenSim::CoordinateActuator, OpenSim::Delp1990Muscle, OpenSim::PointActuator, OpenSim::PointToPointActuator, OpenSim::RigidTendonMuscle, OpenSim::Schutte1993Muscle, OpenSim::Thelen2003Muscle, OpenSim::TorqueActuator, OpenSim::ActivationFiberLengthMuscle, OpenSim::Actuator, OpenSim::Muscle, and OpenSim::PathActuator.
void Actuator_::updateGeometry | ( | ) | [protected, virtual] |
Update the geometric representation of the Actuator if any.
The resulting geometry is maintained at the VisibleObject layer
int OpenSim::Actuator_::_controlIndex [protected] |