1 #ifndef SimTK_SIMBODY_MOTION_H_ 2 #define SimTK_SIMBODY_MOTION_H_ 36 class SimbodyMatterSubsystem;
44 #ifndef SimTK_SIMBODY_DEFINING_MOTION 45 extern template class PIMPLHandle<Motion, MotionImpl, true>;
121 static const char* nameOfLevel(
Level);
137 static const char* nameOfMethod(
Method);
173 void disable(
State& state)
const;
184 void enable(
State& state)
const;
187 bool isDisabled(
const State& state)
const;
193 void setDisabledByDefault(
bool shouldBeDisabled);
198 bool isDisabledByDefault()
const;
213 Method& udotMethod)
const;
225 class PolynomialImpl;
298 Steady& setDefaultRate(
Real u);
306 Steady& setDefaultRates(
const Vec<N>& u);
313 void setRate(
State& state,
Real u)
const;
401 "Motion::Custom::Implementation::clone()",
402 "Concrete Implementation did not supply a clone() method, " 403 "but a copy operation was attempted.");
434 virtual void calcPrescribedPosition
448 virtual void calcPrescribedPositionDot
449 (
const State& s,
int nq,
Real* qdot)
const;
463 virtual void calcPrescribedPositionDotDot
464 (
const State& s,
int nq,
Real* qdotdot)
const;
480 virtual void calcPrescribedVelocity
493 virtual void calcPrescribedVelocityDot
494 (
const State& s,
int nu,
Real* udot)
const;
510 virtual void calcPrescribedAcceleration
511 (
const State& s,
int nu,
Real* udot)
const;
535 #endif // SimTK_SIMBODY_MOTION_H_ virtual void realizeDynamics(const State &state) const
Definition: Motion.h:526
This non-holonomic Motion object imposes a constant rate on all mobilities.
Definition: Motion.h:277
Motion(MotionImpl *r)
For internal use: construct a new Motion handle referencing a particular implementation object...
Definition: Motion.h:231
virtual void realizeVelocity(const State &state) const
Definition: Motion.h:525
Steady()
Default constructor creates an empty handle than can be assigned to reference any Motion::Steady obje...
Definition: Motion.h:294
This is the top-level SimTK namespace into which all SimTK names are placed to avoid collision with o...
Definition: Assembler.h:37
This class can be used to define new motions.
Definition: Motion.h:362
A Motion object belongs to a particular MobilizedBody and prescribes how the associated motion is to ...
Definition: Motion.h:107
Prescribe position, velocity, or acceleration motion as a sinusoidal function of time, m(t) = a * sin( w*t + p ).
Definition: Motion.h:240
Every Simbody header and source file should include this header before any other Simbody header...
SimTK_Real Real
This is the default compiled-in floating point type for SimTK, either float or double.
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:593
#define SimTK_ERRCHK_ALWAYS(cond, whereChecked, msg)
Definition: ExceptionMacros.h:281
Motion()
Default constructor creates an empty Motion handle that can be assigned to reference any kind of Moti...
Definition: Motion.h:141
This object is intended to contain all state information for a SimTK::System, except topological info...
Definition: State.h:276
This is the abstract base class for Custom Motion implementations.
Definition: Motion.h:392
virtual void realizeInstance(const State &state) const
Definition: Motion.h:522
virtual Motion::Method getLevelMethod(const State &) const
Override this if the method is not Motion::Prescribed.
Definition: Motion.h:419
Includes internal headers providing declarations for the basic SimTK Core classes, including Simmatrix.
Level
What is the highest level of motion that is driven? Lower levels are also driven; higher levels are d...
Definition: Motion.h:112
#define SimTK_INSERT_DERIVED_HANDLE_DECLARATIONS(DERIVED, DERIVED_IMPL, PARENT)
Definition: PrivateImplementation.h:343
virtual void realizePosition(const State &state) const
Definition: Motion.h:524
virtual void realizeReport(const State &state) const
Definition: Motion.h:528
Custom()
Default constructor creates an empty handle that can be assigned to reference any Motion::Custom obje...
Definition: Motion.h:376
motion is function of time and state; <level is derivative
Definition: Motion.h:130
virtual Implementation * clone() const
Override this if you want your Motion objects to be copyable.
Definition: Motion.h:399
#define SimTK_SIMBODY_EXPORT
Definition: Simbody/include/simbody/internal/common.h:72
A MobilizedBody is Simbody's fundamental body-and-joint object used to parameterize a system's motion...
Definition: MobilizedBody.h:167
virtual void realizeTopology(State &state) const
Definition: Motion.h:520
Method
There are several ways to specify the motion at this Level, and the selected method also determines l...
Definition: Motion.h:126
virtual void realizeModel(State &state) const
Definition: Motion.h:521
virtual void realizeAcceleration(const State &state) const
Definition: Motion.h:527
Sinusoid()
Default constructor creates an empty handle that can be assigned to reference any Motion::Sinusoid ob...
Definition: Motion.h:264
virtual void realizeTime(const State &state) const
Definition: Motion.h:523
The Mobilizer associated with each MobilizedBody, once modeled, has a specific number of generalized ...
virtual ~Implementation()
Destructor is virtual; be sure to provide one in you concrete class if there is anything to destruct...
Definition: Motion.h:396