Simbody
3.6

This is the abstract base class for Custom Motion implementations. More...
Public Member Functions  
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...  
Position (Holonomic) prescribed motion virtuals  
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...  
Velocity (Nonholonomic) prescribed motion virtuals  
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...  
Accelerationonly prescribed motion virtual  
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...  
Optional realize() virtual methods  
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.

inlinevirtual 
Destructor is virtual; be sure to provide one in you concrete class if there is anything to destruct.

inlinevirtual 
Override this if you want your Motion objects to be copyable.

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.

inlinevirtual 
Override this if the method is not Motion::Prescribed.

virtual 
This operator is called during the MatterSubsystem's realize(Time) computation.
This Motion's own realizeTime() method will already have been called. The result must depend only on time and earlierstage state variables.

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 crossmobilizer 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 
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 crossmobilizer 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 
This operator is called during the MatterSubsystem's realize(Position) computation.
The result must depend only on time and positions (of any body or mobilizer), or earlierstage state variables; it must not depend on any velocities. This Motion's own realizePosition() method will already have been called. This will not be called if the u's are known to be zero.

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 crossmobilizer 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.

virtual 
This operator is called during the MatterSubsystem's realize(Dynamics) computation.
The result can depend on time, any positions, and any velocities but must not depend on accelerations or reaction forces. This Motion's own realizeDynamics() method will already have been called. This will not be called if the udots are known to be zero.

inlinevirtual 

inlinevirtual 

inlinevirtual 

inlinevirtual 

inlinevirtual 

inlinevirtual 

inlinevirtual 

inlinevirtual 

inlinevirtual 