Simbody  3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
SimTK::Motion::Steady Class Reference

This non-holonomic Motion object imposes a constant rate on all mobilities. More...

+ Inheritance diagram for SimTK::Motion::Steady:

Public Member Functions

 Steady (MobilizedBody &mobod, Real u)
 Create a Motion::Steady where all mobilities have the same velocity. More...
 
template<int N>
 Steady (MobilizedBody &mobod, const Vec< N > &u)
 Create a Motion::Steady with different velocities for each mobility specified. More...
 
 Steady ()
 Default constructor creates an empty handle than can be assigned to reference any Motion::Steady object. More...
 
SteadysetDefaultRate (Real u)
 Change the default rate this Motion will prescribe unless overridden in a particular State. More...
 
SteadysetOneDefaultRate (MobilizerUIndex, Real u)
 Change the default rate this Motion will prescribe for one mobility, unless overridden in a particular State. More...
 
template<int N>
SteadysetDefaultRates (const Vec< N > &u)
 Change the default rates this Motion will prescribe, supplying separate rates for each mobility as a Vec<N>. More...
 
Real getOneDefaultRate (MobilizerUIndex ux) const
 Get the default rate setting for one mobility. More...
 
void setRate (State &state, Real u) const
 Change the rate to be prescribed by this Motion when used with the given State. More...
 
void setOneRate (State &state, MobilizerUIndex ux, Real u) const
 Change the rate this Motion will prescribe for one mobility when used with the given State. More...
 
Real getOneRate (const State &state, MobilizerUIndex ux) const
 Get the rate setting for one mobility. More...
 
- 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. More...
 
Level getLevel (const State &) const
 Get the highest level being driven by this Motion. More...
 
Method getLevelMethod (const State &) const
 Get the method being used to control the indicated Level. More...
 
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). More...
 
void enable (State &state) const
 Enable this Motion, without necessarily satisfying it. More...
 
bool isDisabled (const State &state) const
 Test whether this Motion is currently disabled in the supplied State. More...
 
void setDisabledByDefault (bool shouldBeDisabled)
 Specify that a Motion is to be inactive by default. More...
 
bool isDisabledByDefault () const
 Test whether this Motion is disabled by default in which case it must be explicitly enabled before it will take effect. More...
 
const MobilizedBodygetMobilizedBody () const
 Get the MobilizedBody to which this Motion belongs. More...
 
void calcAllMethods (const State &s, Method &qMethod, Method &uMethod, Method &udotMethod) const
 (Advanced) This implements the above table. More...
 
- 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. More...
 
bool isOwnerHandle () const
 Returns true if this handle is the owner of the implementation object to which it refers. More...
 
bool isSameHandle (const Motion &other) const
 Determine whether the supplied handle is the same object as "this" PIMPLHandle. More...
 
void disown (Motion &newOwner)
 Give up ownership of the implementation to an empty handle. More...
 
PIMPLHandlereferenceAssign (const Motion &source)
 "Copy" assignment but with shallow (pointer) semantics. More...
 
PIMPLHandlecopyAssign (const Motion &source)
 This is real copy assignment, with ordinary C++ object ("value") semantics. More...
 
void clearHandle ()
 Make this an empty handle, deleting the implementation object if this handle is the owner of it. More...
 
const MotionImpl & getImpl () const
 Get a const reference to the implementation associated with this Handle. More...
 
MotionImpl & updImpl ()
 Get a writable reference to the implementation associated with this Handle. More...
 
int getImplHandleCount () const
 Return the number of handles the implementation believes are referencing it. More...
 

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...
 
- Public Types inherited from SimTK::PIMPLHandle< Motion, MotionImpl, true >
typedef PIMPLHandle< Motion,
MotionImpl, PTR > 
HandleBase
 
typedef HandleBase ParentHandle
 
- 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. More...
 
static const char * nameOfMethod (Method)
 Returns a human-readable name corresponding to the given Method; useful for debugging. More...
 
- Protected Member Functions inherited from SimTK::Motion
 Motion (MotionImpl *r)
 For internal use: construct a new Motion handle referencing a particular implementation object. More...
 
- Protected Member Functions inherited from SimTK::PIMPLHandle< Motion, MotionImpl, true >
 PIMPLHandle ()
 The default constructor makes this an empty handle. More...
 
 PIMPLHandle (MotionImpl *p)
 This provides consruction of a handle referencing an existing implementation object. More...
 
 PIMPLHandle (const PIMPLHandle &source)
 The copy constructor makes either a deep (value) or shallow (reference) copy of the supplied source PIMPL object, based on whether this is a "pointer semantics" (PTR=true) or "object (value) semantics" (PTR=false, default) class. More...
 
 ~PIMPLHandle ()
 Note that the destructor is non-virtual. More...
 
PIMPLHandleoperator= (const PIMPLHandle &source)
 Copy assignment makes the current handle either a deep (value) or shallow (reference) copy of the supplied source PIMPL object, based on whether this is a "pointer sematics" (PTR=true) or "object (value) semantics" (PTR=false, default) class. More...
 
void setImpl (MotionImpl *p)
 Set the implementation for this empty handle. More...
 
bool hasSameImplementation (const Motion &other) const
 Determine whether the supplied handle is a reference to the same implementation object as is referenced by "this" PIMPLHandle. More...
 

Detailed Description

This non-holonomic Motion object imposes a constant rate on all mobilities.

Constructor & Destructor Documentation

Create a Motion::Steady where all mobilities have the same velocity.

Parameters
[in,out]mobodthe MobilizedBody to which this Motion should be added
[in]uthe rate to be applied to all mobilities
template<int N>
SimTK::Motion::Steady::Steady ( MobilizedBody mobod,
const Vec< N > &  u 
)

Create a Motion::Steady with different velocities for each mobility specified.

Any unspecified mobilities will get zero velocity.

Parameters
[in,out]mobodthe MobilizedBody to which this Motion should be added
[in]uthe rates to be applied to the first N mobilities; the rest are set to zero

Default constructor creates an empty handle than can be assigned to reference any Motion::Steady object.

Member Function Documentation

Steady& SimTK::Motion::Steady::setDefaultRate ( Real  u)

Change the default rate this Motion will prescribe unless overridden in a particular State.

All mobilities will use this same rate.

Steady& SimTK::Motion::Steady::setOneDefaultRate ( MobilizerUIndex  ,
Real  u 
)

Change the default rate this Motion will prescribe for one mobility, unless overridden in a particular State.

Rates for the other mobilities (if there is more than one) remain unchanged.

template<int N>
Steady& SimTK::Motion::Steady::setDefaultRates ( const Vec< N > &  u)

Change the default rates this Motion will prescribe, supplying separate rates for each mobility as a Vec<N>.

Real SimTK::Motion::Steady::getOneDefaultRate ( MobilizerUIndex  ux) const

Get the default rate setting for one mobility.

void SimTK::Motion::Steady::setRate ( State state,
Real  u 
) const

Change the rate to be prescribed by this Motion when used with the given State.

All mobilities will use this same rate.

void SimTK::Motion::Steady::setOneRate ( State state,
MobilizerUIndex  ux,
Real  u 
) const

Change the rate this Motion will prescribe for one mobility when used with the given State.

Rates for the other mobilities (if there is more than one) remain unchanged.

Real SimTK::Motion::Steady::getOneRate ( const State state,
MobilizerUIndex  ux 
) const

Get the rate setting for one mobility.


The documentation for this class was generated from the following file: