Simbody  3.4 (development)
SimTK::MobilizedBody::Pin Class Reference

Provides one rotational mobility about the common z axis of the F and M frames of the mobilizer. More...

#include <MobilizedBody_Pin.h>

+ Inheritance diagram for SimTK::MobilizedBody::Pin:

List of all members.

Public Member Functions

 Pin ()
 Default constructor provides an empty handle that can be assigned to reference any MobilizedBody::Pin.
 Pin (MobilizedBody &parent, const Transform &X_PF, const Body &bodyInfo, const Transform &X_BM, Direction=Forward)
 Create a Pin mobilizer between an existing parent (inboard) body P and a new child (outboard) body B created by copying the given bodyInfo into a privately-owned Body within the constructed MobilizedBody object.
 Pin (MobilizedBody &parent, const Body &bodyInfo, Direction=Forward)
 Abbreviated constructor you can use if the mobilizer frames are coincident with the parent and child body frames.
PinsetDefaultAngle (Real angleInRad)
 Set the value that the pin angle should have in the default state.
Real getDefaultAngle () const
 Get the value that the pin angle will have in the default state.
void setAngle (State &s, Real angleInRad)
 Set the pin joint angle (generalized coordinate q) in the given state.
Real getAngle (const State &s) const
 Get the value that this pin joint's angular coordinate has in the given state.
void setRate (State &s, Real rateInRadPerTime)
 Set the rotation rate (generalized speed u) for this pin joint in the given state.
Real getRate (const State &s) const
 Get the current rotation rate (generalized speed u) that this pin mobilizer has in the given state.
Real getAppliedPinTorque (const State &s, const Vector &mobilityForces) const
 Get the generalized force corresponding to this pin mobilizer in the given array of mobility forces.
void applyPinTorque (const State &s, Real torque, Vector &mobilityForces) const
 Add in a torque to the generalized force element corresponding to this pin mobilizer in the given array of mobility forces.
PinsetDefaultQ (Real)
Real getDefaultQ () const
Real getQ (const State &) const
Real getQDot (const State &) const
Real getQDotDot (const State &) const
Real getU (const State &) const
Real getUDot (const State &) const
void setQ (State &, Real) const
void setU (State &, Real) const
Real getMyPartQ (const State &, const Vector &qlike) const
Real getMyPartU (const State &, const Vector &ulike) const
Real & updMyPartQ (const State &, Vector &qlike) const
Real & updMyPartU (const State &, Vector &ulike) const
PinaddBodyDecoration (const Transform &X_BD, const DecorativeGeometry &g)
 Add decorative geometry specified relative to the new (outboard) body's reference frame B.
PinaddOutboardDecoration (const Transform &X_MD, const DecorativeGeometry &g)
 Add decorative geometry specified relative to the outboard mobilizer frame M attached to body B.
PinaddInboardDecoration (const Transform &X_FD, const DecorativeGeometry &g)
 Add decorative geometry specified relative to the inboard mobilizer frame F attached to the parent body P.
PinsetDefaultInboardFrame (const Transform &X_PF)
 Change this mobilizer's frame F on the parent body P.
PinsetDefaultOutboardFrame (const Transform &X_BM)
 Change this mobilizer's frame M fixed on this (the outboard) body B.

Detailed Description

Provides one rotational mobility about the common z axis of the F and M frames of the mobilizer.

If you want rotation about a different direction, rotate the F and M frames when you define the mobilized body, so that the z axes are in the desired direction.

The single generalized coordinate q is the rotation angle in radians, and the generalized speed u is the rotation rate in radians/time unit, with qdot=u.

Synonyms: Torsion, Revolute.


Constructor & Destructor Documentation

Default constructor provides an empty handle that can be assigned to reference any MobilizedBody::Pin.

SimTK::MobilizedBody::Pin::Pin ( MobilizedBody parent,
const Transform X_PF,
const Body bodyInfo,
const Transform X_BM,
Direction  = Forward 
)

Create a Pin mobilizer between an existing parent (inboard) body P and a new child (outboard) body B created by copying the given bodyInfo into a privately-owned Body within the constructed MobilizedBody object.

Specify the mobilizer frames F fixed to parent P and M fixed to child B.

See also:
MobilizedBody for a diagram and explanation of terminology.
SimTK::MobilizedBody::Pin::Pin ( MobilizedBody parent,
const Body bodyInfo,
Direction  = Forward 
)

Abbreviated constructor you can use if the mobilizer frames are coincident with the parent and child body frames.


Member Function Documentation

Pin& SimTK::MobilizedBody::Pin::setDefaultAngle ( Real  angleInRad) [inline]

Set the value that the pin angle should have in the default state.

If unspecified the initial angle will be zero.

Get the value that the pin angle will have in the default state.

void SimTK::MobilizedBody::Pin::setAngle ( State s,
Real  angleInRad 
) [inline]

Set the pin joint angle (generalized coordinate q) in the given state.

The angle is in radians.

Real SimTK::MobilizedBody::Pin::getAngle ( const State s) const [inline]

Get the value that this pin joint's angular coordinate has in the given state.

The result is in radians.

void SimTK::MobilizedBody::Pin::setRate ( State s,
Real  rateInRadPerTime 
) [inline]

Set the rotation rate (generalized speed u) for this pin joint in the given state.

The rate is in radians/time unit.

Real SimTK::MobilizedBody::Pin::getRate ( const State s) const [inline]

Get the current rotation rate (generalized speed u) that this pin mobilizer has in the given state.

The rate is in radians/time unit.

Real SimTK::MobilizedBody::Pin::getAppliedPinTorque ( const State s,
const Vector mobilityForces 
) const [inline]

Get the generalized force corresponding to this pin mobilizer in the given array of mobility forces.

void SimTK::MobilizedBody::Pin::applyPinTorque ( const State s,
Real  torque,
Vector mobilityForces 
) const [inline]

Add in a torque to the generalized force element corresponding to this pin mobilizer in the given array of mobility forces.

Real SimTK::MobilizedBody::Pin::getQ ( const State ) const
Real SimTK::MobilizedBody::Pin::getQDot ( const State ) const
Real SimTK::MobilizedBody::Pin::getQDotDot ( const State ) const
Real SimTK::MobilizedBody::Pin::getU ( const State ) const
Real SimTK::MobilizedBody::Pin::getUDot ( const State ) const
void SimTK::MobilizedBody::Pin::setQ ( State ,
Real   
) const
void SimTK::MobilizedBody::Pin::setU ( State ,
Real   
) const
Real SimTK::MobilizedBody::Pin::getMyPartQ ( const State ,
const Vector qlike 
) const
Real SimTK::MobilizedBody::Pin::getMyPartU ( const State ,
const Vector ulike 
) const
Real& SimTK::MobilizedBody::Pin::updMyPartQ ( const State ,
Vector qlike 
) const
Real& SimTK::MobilizedBody::Pin::updMyPartU ( const State ,
Vector ulike 
) const
Pin& SimTK::MobilizedBody::Pin::addBodyDecoration ( const Transform X_BD,
const DecorativeGeometry geometry 
) [inline]

Add decorative geometry specified relative to the new (outboard) body's reference frame B.

Note that the body itself may already have had some decorative geometry on it when it was first put into this MobilizedBody; this just adds more and the returned index is larger. Use the underlying Body object's accessors to find this decorative geometry again. The given geometry object is copied here; we do not keep a reference to the supplied object.

Reimplemented from SimTK::MobilizedBody.

Pin& SimTK::MobilizedBody::Pin::addOutboardDecoration ( const Transform X_MD,
const DecorativeGeometry geometry 
) [inline]

Add decorative geometry specified relative to the outboard mobilizer frame M attached to body B.

If body B already has decorative geometry on it, this just adds some more, but kept in a separate list from the body decorations and inboard decorations. Returns a unique index that can be used to identify this outboard decoration later (numbered starting from zero for outboard decorations only).

Reimplemented from SimTK::MobilizedBody.

Pin& SimTK::MobilizedBody::Pin::addInboardDecoration ( const Transform X_FD,
const DecorativeGeometry geometry 
) [inline]

Add decorative geometry specified relative to the inboard mobilizer frame F attached to the parent body P.

If body P already has decorative geometry on it, this just adds some more, but kept in a separate list from the body decorations and outboard decorations. Returns a unique index that can be used to identify this inboard decoration later (numbered starting from zero for inboard decorations only).

Reimplemented from SimTK::MobilizedBody.

Change this mobilizer's frame F on the parent body P.

Calling this method invalidates the MobilizedBody's topology, so the containing matter subsystem's realizeTopology() method must be called again. A reference to this MobilizedBody is returned so that this can be chained like an assignment operator.

Reimplemented from SimTK::MobilizedBody.

Change this mobilizer's frame M fixed on this (the outboard) body B.

Calling this method invalidates the MobilizedBody's topology, so the containing matter subsystem's realizeTopology() method must be called again. A reference to this MobilizedBody is returned so that this can be chained like an assignment operator.

Reimplemented from SimTK::MobilizedBody.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines