|
virtual | ~Implementation () |
| Destructor is virtual; be sure to provide one in you concrete class if there is anything to destruct. More...
|
|
virtual Implementation * | clone () const |
| Override this if you want your Motion objects to be copyable. More...
|
|
virtual Motion::Level | getLevel (const State &) const =0 |
| A Motion prescribes either position, velocity, or acceleration. More...
|
|
virtual Motion::Method | getLevelMethod (const State &) const |
| Override this if the method is not Motion::Prescribed. More...
|
|
|
These must be defined if the motion method is "Prescribed" and the motion level is "Position".
In that case q=q(t), qdot, and qdotdot are all required. Note that Simbody passes in the number of q's being prescribed; make sure you are seeing what you expect.
|
virtual void | calcPrescribedPosition (const State &s, int nq, Real *q) const |
| This operator is called during the MatterSubsystem's realize(Time) computation. More...
|
|
virtual void | calcPrescribedPositionDot (const State &s, int nq, Real *qdot) const |
| Calculate the time derivative of the prescribed positions. More...
|
|
virtual void | calcPrescribedPositionDotDot (const State &s, int nq, Real *qdotdot) const |
| Calculate the 2nd time derivative of the prescribed positions. More...
|
|
|
These must be defined if the motion method is "Prescribed" and the motion level is "Velocity".
In that case u=u(t,q), and udot are both required. Note that Simbody passes in the number of u's being prescribed; make sure you are seeing what you expect.
|
virtual void | calcPrescribedVelocity (const State &s, int nu, Real *u) const |
| This operator is called during the MatterSubsystem's realize(Position) computation. More...
|
|
virtual void | calcPrescribedVelocityDot (const State &s, int nu, Real *udot) const |
| Calculate the time derivative of the prescribed velocity. More...
|
|
|
This must be defined if the motion method is "Prescribed" and the motion level is "Acceleration".
In that case udot=udot(t,q,u) is required. Note that Simbody passes in the number of u's (same as number of udots) being prescribed; make sure you are seeing what you expect.
|
virtual void | calcPrescribedAcceleration (const State &s, int nu, Real *udot) const |
| This operator is called during the MatterSubsystem's realize(Dynamics) computation. More...
|
|
|
The following methods may optionally be overridden to do specialized realization for a Motion.
These are called during the corresponding realization stage of the containing MatterSubsystem.
|
virtual void | realizeTopology (State &state) const |
|
virtual void | realizeModel (State &state) const |
|
virtual void | realizeInstance (const State &state) const |
|
virtual void | realizeTime (const State &state) const |
|
virtual void | realizePosition (const State &state) const |
|
virtual void | realizeVelocity (const State &state) const |
|
virtual void | realizeDynamics (const State &state) const |
|
virtual void | realizeAcceleration (const State &state) const |
|
virtual void | realizeReport (const State &state) const |
|
This is the abstract base class for Custom Motion implementations.
- See also
- SimTK::Motion::Custom
virtual Motion::Level SimTK::Motion::Custom::Implementation::getLevel |
( |
const State & |
| ) |
const |
|
pure virtual |
A Motion prescribes either position, velocity, or acceleration.
When velocity is prescribed, acceleration must also be prescribed as the time derivative of the velocity. And, when position is prescribed, velocity must also be prescribed as the time derivative of the position (and acceleration as above). Thus acceleration is always prescribed. Anything not prescribed will be determined by numerical integration, by relaxation, or by discrete changes driven by events, depending on whether the associated mobilizer is "free", "fast", or "slow", respectively.
virtual void SimTK::Motion::Custom::Implementation::calcPrescribedPositionDot |
( |
const State & |
s, |
|
|
int |
nq, |
|
|
Real * |
qdot |
|
) |
| const |
|
virtual |
Calculate the time derivative of the prescribed positions.
The qdots calculated here must be the exact time derivatives of the q's returned by calcPrescribedPosition(). So the calculation must be limited to the same dependencies, plus the current value of this mobilizer's q's (or the cross-mobilizer transform X_FM because that depends only on those q's). Note that we are return qdots, not u's; they are not always the same. Simbody knows how to map from qdots to u's when necessary.
This operator is called during the MatterSubsystem's realize(Position) computation. This Motion's own realizePosition() method will already have been called.
virtual void SimTK::Motion::Custom::Implementation::calcPrescribedPositionDotDot |
( |
const State & |
s, |
|
|
int |
nq, |
|
|
Real * |
qdotdot |
|
) |
| const |
|
virtual |
Calculate the 2nd time derivative of the prescribed positions.
The qdotdots calculated here must be the exact time derivatives of the qdots returned by calcPrescribedPositionDot(). So the calculation must be limited to the same dependencies, plus the current value of this mobilizer's qdots (or the cross-mobilizer velocity V_FM because that depends only on those qdots). Note that we are return qdotdots, not udots; they are not always the same. Simbody knows how to map from qdotdots to udots when necessary.
This operator is called during the MatterSubsystem's realize(Dynamics) computation. This Motion's own realizeDynamics() method will already have been called.
virtual void SimTK::Motion::Custom::Implementation::calcPrescribedVelocityDot |
( |
const State & |
s, |
|
|
int |
nu, |
|
|
Real * |
udot |
|
) |
| const |
|
virtual |
Calculate the time derivative of the prescribed velocity.
The udots calculated here must be the exact time derivatives of the u's returned by calcPrescribedVelocity(). So the calculation must be limited to the same dependencies, plus the current value of this mobilizer's u's (or the cross-mobilizer velocity V_FM because that depends only on those u's).
This operator is called during the MatterSubsystem's realize(Dynamics) computation. This Motion's own realizeDynamics() method will already have been called. This will not be called if the udots are known to be zero.