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

Public Member Functions | |
| rdDerivCallback (rdModel *aModel) | |
| Default constructor. | |
| virtual | ~rdDerivCallback () |
| Destructor. | |
| virtual void | set (double aT, double *aX, double *aY) |
| This method is intended to be called from rdModel::deriv() after the states of a model have been set (e.g., after rdModel::set() or rdModel::setStates()). | |
| virtual void | computeContact (double aT, double *aX, double *aY) |
| This method is intended to be called from rdModel::deriv() after contact quantities have been computed (e.g., after rdModel::computeContact()). | |
| virtual void | applyContact (double aT, double *aX, double *aY) |
| This method is intended to be called from rdModel::deriv() after contact forces have been applied (e.g., after rdModel::applyContactForces()). | |
| virtual void | computeActuation (double aT, double *aX, double *aY) |
| This method is intended to be called from rdModel::deriv() after actuation quantities have been computed (e.g., after rdModel::computeActuation()). | |
| virtual void | applyActuation (double aT, double *aX, double *aY) |
| This method is intended to be called from rdModel::deriv() after actuator forces have been applied (e.g., after rdModel::applyActuatorForces()). | |
| virtual void | computeDerivatives (double aT, double *aX, double *aY, double *aDY) |
| This method is intended to be called from rdModel::deriv() after derivatives of the model states have been computed (e.g., after rdModel::computeAccelerations(), ...). | |
Private Member Functions | |
| void | setNull () |
| Set NULL values for member variables. | |
Derivative callbacks are registered with a model and provide a set of methods that the model calls during computation of the model state derivatives. The methods are set(), computeContact(), applyContact(), computeActuation(), applyActuation(), and computeDerivatives(). These methods provide low-level access for making adjustments to model states and applied forces, applying additional forces, and/or altering state derivatives. Each of these methods is intended to be called FOLLOWING the corresponding action in rdModel::deriv(), although rdModel::deriv() can be written to call these methods in any order or not at all.
Derivative callbacks are meant to make alterations to the "normal" model of simulation either for analysis or to achieve some unusual effect. Alternately, this class can be used to implement the entirety of the rdModel::deriv() method, giving the user nearly complete control of how derivatives are computed without making changes to the model. To accomplish this, the user may need to make a new derived model class that overrides rdModel::deriv() with a new method that makes the appropriate rdDerivCallback method calls.
On a final note, it is possible to register many derivative callbacks with a model and no attempt is made to ensure that the the actions of registered callbacks are compatible. Ensuring compatibility is left to the user.
|
|
Default constructor.
|
|
||||||||||||||||
|
This method is intended to be called from rdModel::deriv() after actuator forces have been applied (e.g., after rdModel::applyActuatorForces()). Override this method in derived classes. Reimplemented in suActuatorPerturbation, suActuatorPerturbationIndependent, suForceApplier, and suGeneralizedForcePerturbation. |
|
||||||||||||||||
|
This method is intended to be called from rdModel::deriv() after contact forces have been applied (e.g., after rdModel::applyContactForces()). Override this method in derived classes. |
|
||||||||||||||||
|
This method is intended to be called from rdModel::deriv() after actuation quantities have been computed (e.g., after rdModel::computeActuation()). Override this method in derived classes. Reimplemented in suActuatorPerturbation, suActuatorPerturbationIndependent, and suGeneralizedForcePerturbation. |
|
||||||||||||||||
|
This method is intended to be called from rdModel::deriv() after contact quantities have been computed (e.g., after rdModel::computeContact()). Override this method in derived classes. |
|
||||||||||||||||||||
|
This method is intended to be called from rdModel::deriv() after derivatives of the model states have been computed (e.g., after rdModel::computeAccelerations(), ...). Override this method in derived classes. |
|
||||||||||||||||
|
This method is intended to be called from rdModel::deriv() after the states of a model have been set (e.g., after rdModel::set() or rdModel::setStates()). Override this method in derived classes. |
1.3