#include <rdActuatedModel_SDFast.h>
Inheritance diagram for rdActuatedModel_SDFast:

Public Member Functions | |
| rdActuatedModel_SDFast (rdActuatorSet *aActuators, rdContactForceSet *aContacts) | |
| Default constructor. | |
| virtual | ~rdActuatedModel_SDFast () |
| Destructor. | |
| const char * | getActuatorName (int aIndex) const |
| Get the name of an actuator. | |
| const rdActuatorSet * | getActuatorSet () const |
| Get the actuators for the model. | |
| const rdContactForceSet * | getContactForceSet () const |
| Get the contact forces for the model. | |
| virtual void | setControls (const double aX[]) |
| Set the current controls for the model. | |
| virtual void | setStates (const double aY[]) |
| Set the current states for this model. | |
| virtual void | getStates (double rY[]) const |
| Get the current states. | |
| virtual double | getState (int aIndex) const |
| Get the a state by index. | |
| virtual void | setPseudoStates (const double aYP[]) |
| Set the current pseudo-states for this model. | |
| virtual void | getPseudoStates (double rYP[]) const |
| Get the current pseudo-states for this model. | |
| virtual double | getPseudoState (int aIndex) const |
| Get the a pseudo-state by index. | |
| virtual void | computeActuation () |
| Compute all quantities associated with actuating a model. | |
| virtual void | computeActuatorStateDerivatives (double rDY[]) |
| Compute time derivatives of all actuator states. | |
| virtual void | applyActuatorForce (int aID) |
| Apply an actuator force. | |
| virtual void | applyActuatorForces () |
| Apply actuator forces. | |
| virtual double | getActuatorForce (int aID) const |
| Get the magnitude of force experted by a particular actuator. | |
| virtual double | getActuatorSpeed (int aID) const |
| Get the speed at which a particular actuator force is applied. | |
| virtual double | getActuatorPower (int aID) const |
| Get the power delivered or absorbed by a particular actuator. | |
| virtual void | computeContact () |
| Compute all quantities associated with simulating contact between bodies. | |
| virtual void | applyContactForce (int aID) |
| Apply a contacted force. | |
| virtual void | applyContactForces () |
| Apply the computed contacted forces. | |
| virtual int | getContactBodyA (int aID) const |
| Get the body number of BodyA for a particular contact force. | |
| virtual int | getContactBodyB (int aID) const |
| Get the body number of BodyB for a particular contact force. | |
| virtual void | setContactPointA (int aID, const double aPoint[3]) |
| Set the contact point on BodyA expressed in the local frame of BodyA for a specified contact. | |
| virtual void | getContactPointA (int aID, double rPoint[3]) const |
| Get the contact point on BodyA expressed in the local frame of BodyA for a particular contact. | |
| virtual void | setContactPointB (int aID, const double aPoint[3]) |
| Set the contact point on BodyB expressed in the local frame of BodyB for a specified contact. | |
| virtual void | getContactPointB (int aID, double rPoint[3]) const |
| Get the contact point on BodyB expressed in the local frame of BodyB for a particular contact. | |
| virtual void | getContactForce (int aID, double rF[3]) const |
| Get the contact force acting on BodyB expressed in the local frame of BodyA for a particular contact force. | |
| virtual void | getContactNormalForce (int aID, double rFP[3], double rFV[3], double rF[3]) const |
| Get the normal contact force acting on BodyB expressed in the local frame of BodyA for a particular contact force. | |
| virtual void | getContactTangentForce (int aID, double rFP[3], double rFV[3], double rF[3]) const |
| Get the tangential contact force acting on BodyB expressed in the local frame of BodyA for a particular contact force. | |
| virtual void | getContactStiffness (int aID, const double aDX[3], double rDF[3]) const |
| Get the instantaneous stiffness (or change in force on BodyB due to a change in position of the BodyB contact point) of a specified contact force. | |
| virtual void | getContactViscosity (int aID, const double aDV[3], double rDF[3]) const |
| Get the instantaneous viscosity (or change in force on BodyB due to a change in velocity of the BodyB contact point) of a specified contact force. | |
| virtual void | getContactFrictionCorrection (int aID, double rDFFric[3]) const |
| Get the correction that was made to the contact force to enforce friction constraints. | |
| virtual double | getContactForce (int aID) const |
| Get the magnitude of force experted by a particular contact force. | |
| virtual double | getContactSpeed (int aID) const |
| Get the speed at which a particular contact force is applied. | |
| virtual double | getContactPower (int aID) const |
| Get the power delivered or absorbed by a particular contact force. | |
| virtual void | promoteControlsToStates (const double aX[], double aDT) |
| Promote a set of controls to state variables. | |
| int | deriv (double t, double *xt, double *y, double *dy) |
| Compute the derivatives of the states. | |
| int | deriv (double t, double *xt, double *y, double *dqdt, double *dudt) |
| Compute the derivatives of the states. | |
| void | integBeginCallback (int i, double dt, double t, double *x, double *y, void *cd=NULL) |
| At the beginning of an integration, initialize the decomposition. | |
| void | integStepCallback (double *xtPrev, double *yPrev, int i, double dt, double t, double *x, double *y, void *cd=NULL) |
| After each integration step, update the horizontal spring zeros and draw the model. | |
Protected Attributes | |
| rdActuatorSet * | _actuatorSet |
| rdContactForceSet * | _contactSet |
Private Member Functions | |
| void | setNull () |
| Set NULL values for all the variable members of this class. | |
| void | constructControls () |
| Construct and initialize the controls array. | |
| void | constructStates () |
| Construct and initialize the state arrays. | |
| void | constructPseudoStates () |
| Construct and initialize the array for the initial pseudo-states. | |
| void | constructNames () |
| Construct the names of the various components of the model. | |
|
|
Apply a contacted force. For the correct contact forces to be applied correctly, computeContact() must be called prior to calling this method. Reimplemented from rdModel. |
|
|
Apply the computed contacted forces. For the correct contact forces to be applied correctly, computeContact() must be called prior to calling this method. Reimplemented from rdModel. |
|
|
Compute all quantities associated with simulating contact between bodies. These quantities include at least the contact bodies, contact points, and contact forces.
Reimplemented from rdModel. |
|
|
Get the magnitude of force experted by a particular actuator. For the returned information to be valid, computeActuation() must be called prior to calling this method.
Reimplemented from rdModel. |
|
|
Get the name of an actuator.
Reimplemented from rdModel. |
|
|
Get the power delivered or absorbed by a particular actuator. A positive power means the actuator is doing work on the model; negative power means that the actuator is absorbing energy from the model. For the returned information to be valid, computeActuation() must be called prior to calling this method.
Reimplemented from rdModel. |
|
|
Get the actuators for the model.
|
|
|
Get the speed at which a particular actuator force is applied. For the returned information to be valid, computeActuation() must be called prior to calling this method.
Reimplemented from rdModel. |
|
|
Get the body number of BodyA for a particular contact force. For the returned information to be valid, computeContact() must be called prior to calling this method.
Reimplemented from rdModel. |
|
|
Get the body number of BodyB for a particular contact force. For the returned information to be valid, computeContact() must be called prior to calling this method.
Reimplemented from rdModel. |
|
|
Get the magnitude of force experted by a particular contact force. For the returned information to be valid, computeContact() must be called prior to calling this method.
Reimplemented from rdModel. |
|
||||||||||||
|
Get the contact force acting on BodyB expressed in the local frame of BodyA for a particular contact force. For the returned information to be valid, computeContact() must be called prior to calling this method.
Reimplemented from rdModel. |
|
|
Get the contact forces for the model.
|
|
||||||||||||
|
Get the correction that was made to the contact force to enforce friction constraints. This correction is returned as the change in contact force applied to BodyB expressed in the local frame of BodyA. Note that this correction is NOT intended to express changes in contact force due to damping terms, but rather changes due to the enforcement of constraints on the tangential component of the contact force, such as enforcing a coefficient of friction (e.g., fx <= mu*fy). For the returned information to be valid, computeContact() must be called prior to calling this method.
Reimplemented from rdModel. |
|
||||||||||||||||||||
|
Get the normal contact force acting on BodyB expressed in the local frame of BodyA for a particular contact force. For the returned information to be valid, computeContact() must be called prior to calling this method.
Reimplemented from rdModel. |
|
||||||||||||
|
Get the contact point on BodyA expressed in the local frame of BodyA for a particular contact. For the returned information to be valid, computeContact() must be called prior to calling this method.
Reimplemented from rdModel. |
|
||||||||||||
|
Get the contact point on BodyB expressed in the local frame of BodyB for a particular contact. For the returned information to be valid, computeContact() must be called prior to calling this method.
Reimplemented from rdModel. |
|
|
Get the power delivered or absorbed by a particular contact force. A positive power means the contact force is doing work on the model; negative power means that the contact force is absorbing energy from the model. For the returned information to be valid, computeContact() must be called prior to calling this method.
Reimplemented from rdModel. |
|
|
Get the speed at which a particular contact force is applied. For the returned information to be valid, computeContact() must be called prior to calling this method.
Reimplemented from rdModel. |
|
||||||||||||||||
|
Get the instantaneous stiffness (or change in force on BodyB due to a change in position of the BodyB contact point) of a specified contact force. aDF = (stiffness) * aDX; stiffness == df/dx (partial of f wrt x) The displacement (aDX) is assumed to be expressed in the local frame of BodyA and specifies a change in position of the BodyB contact point. If the aDX is a unit vector, the returned value is the stiffness of the contact force in the direction aDX. However, if aDX is not a unit vector, the returned value is the change in force applied to BodyB that would occur for a displacment of aDX. For the returned information to be valid, computeContact() must be called prior to calling this method.
Reimplemented from rdModel. |
|
||||||||||||||||||||
|
Get the tangential contact force acting on BodyB expressed in the local frame of BodyA for a particular contact force. For the returned information to be valid, computeContact() must be called prior to calling this method.
Reimplemented from rdModel. |
|
||||||||||||||||
|
Get the instantaneous viscosity (or change in force on BodyB due to a change in velocity of the BodyB contact point) of a specified contact force. aDF = (viscosity) * aDV; viscosity == df/dv (partial of f wrt v) The velocity change (aDV) is assumed to be expressed in the local frame of BodyA and specifies a change in velocity of the BodyB contact point. If the aDV is a unit vector, the returned value is the visocity of the contact force in the direction aDV. However, if aDV is not a unit vector, the returned value is the change in force applied to BodyB that would occur for a change in velocity of aDV. For the returned information to be valid, computeContact() must be called prior to calling this method.
Reimplemented from rdModel. |
|
|
Get the a pseudo-state by index.
Reimplemented from rdModel. |
|
|
Get the current pseudo-states for this model.
Reimplemented from rdModel. |
|
|
Get the a state by index.
Implements rdModel. |
|
|
Get the current states.
Implements rdModel. |
|
||||||||||||
|
Promote a set of controls to state variables. This method is normally useful when solving for controls that will optimize some aspect of a model performance. For example, in models in which the controls are neural excitations, but muscle forces are determined by activation level, this method might set the muscle activations equal to the excitations. Each actuator is responsible for knowing how to promote its own controls to states. For static problems, the time step should be set to zero (i.e., aDT=0.0) for dynamic problems, like during a forward dynamic simulation, aDT should be set to an appropriate time step value, like the integration step size.
Reimplemented from rdModel. |
|
||||||||||||
|
Set the contact point on BodyA expressed in the local frame of BodyA for a specified contact.
Reimplemented from rdModel. |
|
||||||||||||
|
Set the contact point on BodyB expressed in the local frame of BodyB for a specified contact.
Reimplemented from rdModel. |
|
|
Set the current controls for the model. The controls must be set for the model and the actuators.
Reimplemented from rdModel. |
|
|
Set the current pseudo-states for this model.
Reimplemented from rdModel. |
|
|
Set the current states for this model. This method sets the configuration (coordinates and speeds) of the model and also the states of the actuators.
Implements rdModel. |
1.3