|
Simbody
3.4
|
Prescribe position, velocity, or acceleration motion as a sinusoidal function of time, m(t) = a * sin( w*t + p ). More...
#include <Motion.h>
Inheritance diagram for SimTK::Motion::Sinusoid:Public Member Functions | |
| Sinusoid (MobilizedBody &mobod, Motion::Level level, Real amplitude, Real rate, Real phase) | |
| Create a sinusoidal prescribed motion applied at position, velocity, or acceleration level. | |
| Sinusoid () | |
| Default constructor creates an empty handle that can be assigned to reference any Motion::Sinusoid object. | |
Public Member Functions inherited from SimTK::Motion | |
| Motion () | |
| Default constructor creates an empty Motion handle that can be assigned to reference any kind of Motion object. | |
| Level | getLevel (const State &) const |
| Get the highest level being driven by this Motion. | |
| Method | getLevelMethod (const State &) const |
| Get the method being used to control the indicated Level. | |
| void | disable (State &state) const |
| Disable this Motion, effectively removing it from the mobilizer to which it belongs and allowing the mobilizer to move freely (unless locked). | |
| void | enable (State &state) const |
| Enable this Motion, without necessarily satisfying it. | |
| bool | isDisabled (const State &state) const |
| Test whether this Motion is currently disabled in the supplied State. | |
| void | setDisabledByDefault (bool shouldBeDisabled) |
| Specify that a Motion is to be inactive by default. | |
| bool | isDisabledByDefault () const |
| Test whether this Motion is disabled by default in which case it must be explicitly enabled before it will take effect. | |
| const MobilizedBody & | getMobilizedBody () const |
| Get the MobilizedBody to which this Motion belongs. | |
| void | calcAllMethods (const State &s, Method &qMethod, Method &uMethod, Method &udotMethod) const |
| (Advanced) This implements the above table. | |
Public Member Functions inherited from SimTK::PIMPLHandle< Motion, MotionImpl, true > | |
| bool | isEmptyHandle () const |
| Returns true if this handle is empty, that is, does not refer to any implementation object. | |
| bool | isOwnerHandle () const |
| Returns true if this handle is the owner of the implementation object to which it refers. | |
| bool | isSameHandle (const Motion &other) const |
| Determine whether the supplied handle is the same object as "this" PIMPLHandle. | |
| void | disown (Motion &newOwner) |
| Give up ownership of the implementation to an empty handle. | |
| PIMPLHandle & | referenceAssign (const Motion &source) |
| "Copy" assignment but with shallow (pointer) semantics. | |
| PIMPLHandle & | copyAssign (const Motion &source) |
| This is real copy assignment, with ordinary C++ object ("value") semantics. | |
| void | clearHandle () |
| Make this an empty handle, deleting the implementation object if this handle is the owner of it. | |
| const MotionImpl & | getImpl () const |
| Get a const reference to the implementation associated with this Handle. | |
| MotionImpl & | updImpl () |
| Get a writable reference to the implementation associated with this Handle. | |
| int | getImplHandleCount () const |
| Return the number of handles the implementation believes are referencing it. | |
Additional Inherited Members | |
Public Types inherited from SimTK::Motion | |
| enum | Level { NoLevel = -1, Acceleration = 0, Velocity = 1, Position = 2 } |
| What is the highest level of motion that is driven? Lower levels are also driven; higher levels are determined by integration. More... | |
| enum | Method { NoMethod = -1, Zero = 0, Discrete = 1, Prescribed = 2, Free = 3, Fast = 4 } |
| There are several ways to specify the motion at this Level, and the selected method also determines lower-level motions. More... | |
Static Public Member Functions inherited from SimTK::Motion | |
| static const char * | nameOfLevel (Level) |
| Returns a human-readable name corresponding to the given Level; useful for debugging. | |
| static const char * | nameOfMethod (Method) |
| Returns a human-readable name corresponding to the given Method; useful for debugging. | |
Protected Member Functions inherited from SimTK::Motion | |
| Motion (MotionImpl *r) | |
| For internal use: construct a new Motion handle referencing a particular implementation object. | |
Prescribe position, velocity, or acceleration motion as a sinusoidal function of time, m(t) = a * sin( w*t + p ).
| SimTK::Motion::Sinusoid::Sinusoid | ( | MobilizedBody & | mobod, |
| Motion::Level | level, | ||
| Real | amplitude, | ||
| Real | rate, | ||
| Real | phase | ||
| ) |
Create a sinusoidal prescribed motion applied at position, velocity, or acceleration level.
| [in,out] | mobod | The MobilizedBody to which this Motion should be added. |
| [in] | level | The Motion level that is being prescribed: Motion::Position, Motion::Velocity, or Motion::Acceleration. |
| [in] | amplitude | Scaling factor mapping the -1..1 sin() result to your desired units; output values will range between -amplitude and +amplitude. |
| [in] | rate | Angular rate in radians/unit time; e.g. if time is in seconds then rate=2*Pi would be 1 Hz (1 rotation per second). |
| [in] | phase | Phase angle in radians. |
|
inline |
Default constructor creates an empty handle that can be assigned to reference any Motion::Sinusoid object.