OpenSim::RollingOnSurfaceConstraint Class Reference

A class implementing a collection of rolling-without-slipping and non-penetration constraints on a surface. More...

#include <RollingOnSurfaceConstraint.h>

Inheritance diagram for OpenSim::RollingOnSurfaceConstraint:
OpenSim::UnilateralConstraint OpenSim::Constraint OpenSim::ModelComponent OpenSim::Object

List of all members.

Public Member Functions

 RollingOnSurfaceConstraint ()
 Default constructor.
 RollingOnSurfaceConstraint (const RollingOnSurfaceConstraint &aConstraint)
 Copy constructor.
virtual ~RollingOnSurfaceConstraint ()
 Destructor.
virtual Objectcopy () const
 Copy this body and return a pointer to the copy.
RollingOnSurfaceConstraintoperator= (const RollingOnSurfaceConstraint &aConstraint)
 Assignment operator.
void copyData (const RollingOnSurfaceConstraint &aConstraint)
 Copy data members from one RollingOnSurfaceConstraint to another.
virtual void setup (Model &aModel)
 Perform some setup functions that happen after the object has been deserialized or copied.
void createSystem (SimTK::MultibodySystem &system) const
 Create the SimTK::Constraints: which implements this RollingOnSurfaceConstraint.
void initState (SimTK::State &state) const
 Populate the the SimTK::State: with defaults for the RollingOnSurfaceConstraint.
void setDefaultsFromState (const SimTK::State &state)
 Given an existing SimTK::State set defaults for the RollingOnSurfaceConstraint.
void setRollingBodyByName (std::string aBodyName)
 Following methods set attributes of the weld constraint.
void setSurfaceBodyByName (std::string aBodyName)
virtual void setContactPointForInducedAccelerations (const SimTK::State &s, SimTK::Vec3 point)
 This method specifies the interface that a constraint must implement in order to be used by the Induced Accelerations Analysis.
virtual std::vector< bool > unilateralConditionsSatisfied (const SimTK::State &state)
virtual bool isDisabled (const SimTK::State &state) const
 Get whether or not the RollingOnSurfaceConstraint is disabled.
virtual bool setDisabled (SimTK::State &state, bool isDisabled)
 Set whether or not the RollingOnSurfaceConstraint is disabled.
bool setDisabled (SimTK::State &state, bool isDisabled, std::vector< bool > shouldBeOn)
bool setDisabledWithCachedUnilateralConditions (bool isDisabled, SimTK::State &state)
virtual void calcConstraintForces (const SimTK::State &state, SimTK::Vector_< SimTK::SpatialVec > &bodyForcesInAncestor, SimTK::Vector &mobilityForces) const
 Ask the RollingOnSurfaceConstraint for the forces it is imposing on the system Simbody multibody system must be realized to at least position Returns: the bodyForces on those bodies being constrained (constrainedBodies) a SpatialVec (6 components) describing resulting torque and force mobilityForces acting along constrained mobilities.

Protected Attributes

PropertyStr _rollingBodyNameProp
 Specify the rolling body for this constraint.
std::string & _rollingBodyName
PropertyStr _surfaceBodyNameProp
 Specify the body containing the surface (plane) that the rolling body rolls on.
std::string & _surfaceBodyName
PropertyDblVec3 _surfaceNormalProp
 Surface normal direction in the surface body.
SimTK::Vec3 & _surfaceNormal
PropertyDbl _surfaceHeightProp
 Surface height in the direction of the normal in the surface body.
double & _surfaceHeight
PropertyDbl _coulombFrictionCoefficientProp
 Coulomb friction coefficient for rolling on the surface.
double & _coulombFrictionCoefficient
PropertyDbl _surfaceContactRadiusProp
 A guess at the area of contact approximated by a circle of radius:.
double & _surfaceContactRadius
Body_rollingBody
 First body is the rolling body.
Body_surfaceBody
 Second body describes the surface body.
std::vector
< SimTK::ConstraintIndex > 
_indices
 Get the indices of underlying constraints to access from Simbody.
std::vector< bool > _defaultUnilateralConditions
 This cache acts a temporary hold for the constraint conditions when time has not changed.

Detailed Description

A class implementing a collection of rolling-without-slipping and non-penetration constraints on a surface.

The underlying Constraints in Simbody are: PointInPlane to oppose penetration into the ground (unitlaterally) ConstantAngle about the normal to the enforce no spinning NoSlip1D along one axis of the plane NoSlip1D along the other axis

mu = Coulomb Friction Coeefficient

Each of these constraints have condition dependent on the reaction forces generate collectively: PointInPlane normal force (Fn) must be positive (in the direction of the normal) ConstantAngle the reaction torque cannnot exceed contactRadius*mu*Fn Both NoSlip conditions are treated together, the magnitude the combined reaction forces (in the plane) cannot exceed mu*Fn

Author:
Ajay Seth
Version:
1.0

Constructor & Destructor Documentation

RollingOnSurfaceConstraint::RollingOnSurfaceConstraint (  ) 

Default constructor.

RollingOnSurfaceConstraint::RollingOnSurfaceConstraint ( const RollingOnSurfaceConstraint aConstraint  ) 

Copy constructor.

Parameters:
aConstraint RollingOnSurfaceConstraint to be copied.
RollingOnSurfaceConstraint::~RollingOnSurfaceConstraint (  )  [virtual]

Destructor.


Member Function Documentation

void RollingOnSurfaceConstraint::calcConstraintForces ( const SimTK::State &  state,
SimTK::Vector_< SimTK::SpatialVec > &  bodyForcesInAncestor,
SimTK::Vector &  mobilityForces 
) const [virtual]

Ask the RollingOnSurfaceConstraint for the forces it is imposing on the system Simbody multibody system must be realized to at least position Returns: the bodyForces on those bodies being constrained (constrainedBodies) a SpatialVec (6 components) describing resulting torque and force mobilityForces acting along constrained mobilities.

Parameters:
state State of model
bodyForcesInAncestor is a Vector of SpatialVecs contain constraint forces
mobilityForces is a Vector of forces that act along the constrained mobilitities associated with this constraint

Reimplemented from OpenSim::Constraint.

Object * RollingOnSurfaceConstraint::copy (  )  const [virtual]

Copy this body and return a pointer to the copy.

The copy constructor for this class is used.

Returns:
Pointer to a copy of this OpenSim::Body.

Implements OpenSim::UnilateralConstraint.

void RollingOnSurfaceConstraint::copyData ( const RollingOnSurfaceConstraint aConstraint  ) 

Copy data members from one RollingOnSurfaceConstraint to another.

Parameters:
aConstraint RollingOnSurfaceConstraint to be copied.

Reimplemented from OpenSim::UnilateralConstraint.

void RollingOnSurfaceConstraint::createSystem ( SimTK::MultibodySystem &  system  )  const [virtual]

Create the SimTK::Constraints: which implements this RollingOnSurfaceConstraint.

Reimplemented from OpenSim::ModelComponent.

void RollingOnSurfaceConstraint::initState ( SimTK::State &  state  )  const [virtual]

Populate the the SimTK::State: with defaults for the RollingOnSurfaceConstraint.

Reimplemented from OpenSim::Constraint.

bool RollingOnSurfaceConstraint::isDisabled ( const SimTK::State &  state  )  const [virtual]

Get whether or not the RollingOnSurfaceConstraint is disabled.

Simbody multibody system instance is realized every time the isDisabled changes, BUT multiple sets to the same value have no cost.

Parameters:
isDisabled If true the constraint is disabled; if false the constraint is enabled.

Reimplemented from OpenSim::Constraint.

RollingOnSurfaceConstraint & RollingOnSurfaceConstraint::operator= ( const RollingOnSurfaceConstraint aConstraint  ) 

Assignment operator.

Returns:
Reference to this object.

Reimplemented from OpenSim::UnilateralConstraint.

virtual void OpenSim::RollingOnSurfaceConstraint::setContactPointForInducedAccelerations ( const SimTK::State &  s,
SimTK::Vec3  point 
) [virtual]

This method specifies the interface that a constraint must implement in order to be used by the Induced Accelerations Analysis.

Reimplemented from OpenSim::Constraint.

void RollingOnSurfaceConstraint::setDefaultsFromState ( const SimTK::State &  state  )  [virtual]

Given an existing SimTK::State set defaults for the RollingOnSurfaceConstraint.

Reimplemented from OpenSim::Constraint.

bool RollingOnSurfaceConstraint::setDisabled ( SimTK::State &  state,
bool  isDisabled,
std::vector< bool >  shouldBeOn 
)
bool RollingOnSurfaceConstraint::setDisabled ( SimTK::State &  state,
bool  isDisabled 
) [virtual]

Set whether or not the RollingOnSurfaceConstraint is disabled.

Since the constraint is composed of multiple constraints, this method can diable the constraints, but enabling is not guaranteed. For example, if the unilateral conditions are violated the constraint will be disabled.

Parameters:
isDisabled If true the constraint is disabled; if false the constraint is enabled.

Reimplemented from OpenSim::Constraint.

bool OpenSim::RollingOnSurfaceConstraint::setDisabledWithCachedUnilateralConditions ( bool  isDisabled,
SimTK::State &  state 
) [inline]
void RollingOnSurfaceConstraint::setRollingBodyByName ( std::string  aBodyName  ) 

Following methods set attributes of the weld constraint.

void RollingOnSurfaceConstraint::setSurfaceBodyByName ( std::string  aBodyName  ) 
void RollingOnSurfaceConstraint::setup ( Model aModel  )  [virtual]

Perform some setup functions that happen after the object has been deserialized or copied.

Parameters:
aEngine dynamics engine containing this RollingOnSurfaceConstraint.

Reimplemented from OpenSim::UnilateralConstraint.

std::vector< bool > RollingOnSurfaceConstraint::unilateralConditionsSatisfied ( const SimTK::State &  state  )  [virtual]

Reimplemented from OpenSim::UnilateralConstraint.


Member Data Documentation

Coulomb friction coefficient for rolling on the surface.

This cache acts a temporary hold for the constraint conditions when time has not changed.

std::vector<SimTK::ConstraintIndex> OpenSim::RollingOnSurfaceConstraint::_indices [protected]

Get the indices of underlying constraints to access from Simbody.

First body is the rolling body.

Specify the rolling body for this constraint.

Second body describes the surface body.

Specify the body containing the surface (plane) that the rolling body rolls on.

A guess at the area of contact approximated by a circle of radius:.

Surface height in the direction of the normal in the surface body.

Surface normal direction in the surface body.


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

Generated on Sun Sep 25 00:20:02 2011 for OpenSim by  doxygen 1.6.1