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 setRollingBodyByName (std::string aBodyName)
 Following methods set attributes of the weld constraint.
void setSurfaceBodyByName (std::string aBodyName)
void setContactPointSurfaceBody (SimTK::Vec3 point)
virtual std::vector< bool > unilateralConditionsSatisfied (SimTK::State &state)
virtual bool getIsDisabled (const SimTK::State &state) const
 Get whether or not the RollingOnSurfaceConstraint is disabled.
virtual bool setIsDisabled (SimTK::State &state, bool isDisabled)
 Set whether or not the RollingOnSurfaceConstraint is disabled.
bool setIsDisabled (SimTK::State &state, bool isDisabled, std::vector< bool > shouldBeOn)
bool setIsDisabledWithCachedUnilateralConditions (bool isDisabled, SimTK::State &state)
virtual void calcConstraintForces (const SimTK::State &state, SimTK::Vector_< SimTK::SpatialVec > &bodyForcesInParent, SimTK::Vector &mobilityForces)
 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 > _cachedUnilateralConditions
 This cache acts a temporary hold for the constraint conditions when time has not changed.

Friends

class SimbodyEngine

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 > &  bodyForcesInParent,
SimTK::Vector &  mobilityForces 
) [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
bodyForcesInParent 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.

Reimplemented from 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.

bool RollingOnSurfaceConstraint::getIsDisabled ( 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.

void OpenSim::RollingOnSurfaceConstraint::setContactPointSurfaceBody ( SimTK::Vec3  point  ) 
bool RollingOnSurfaceConstraint::setIsDisabled ( SimTK::State &  state,
bool  isDisabled,
std::vector< bool >  shouldBeOn 
)
bool RollingOnSurfaceConstraint::setIsDisabled ( 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.
bool OpenSim::RollingOnSurfaceConstraint::setIsDisabledWithCachedUnilateralConditions ( 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 ( SimTK::State &  state  )  [virtual]

Friends And Related Function Documentation

friend class SimbodyEngine [friend]

Reimplemented from OpenSim::UnilateralConstraint.


Member Data Documentation

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

Coulomb friction coefficient for rolling on the surface.

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 Wed Dec 16 15:03:48 2009 for OpenSim by  doxygen 1.6.1