Simbody  3.4 (development)
SimTK::Constraint::BallRollingOnPlane Class Reference

This constraint enforces continuous contact and non-slip rolling between a spherical surface fixed on one body and a half space (flat surface) fixed on another. More...

#include <Constraint.h>

+ Inheritance diagram for SimTK::Constraint::BallRollingOnPlane:

List of all members.

Public Member Functions

 BallRollingOnPlane (MobilizedBody &planeBody_P, const UnitVec3 &defaultPlaneNormal_P, Real defaultPlaneHeight, MobilizedBody &ballBody_B, const Vec3 &defaultBallCenter_B, Real defaultBallRadius)
 Create a BallOnPlane constraint and define the default plane and ball geometry.
 BallRollingOnPlane ()
 Default constructor creates an empty handle.
BallRollingOnPlanesetPlaneDisplayHalfWidth (Real)
Real getPlaneDisplayHalfWidth () const
BallRollingOnPlanesetDefaultPlaneNormal (const UnitVec3 &)
BallRollingOnPlanesetDefaultPlaneHeight (Real)
BallRollingOnPlanesetDefaultBallCenter (const Vec3 &)
BallRollingOnPlanesetDefaultBallRadius (Real)
MobilizedBodyIndex getPlaneMobilizedBodyIndex () const
MobilizedBodyIndex getBallMobilizedBodyIndex () const
const UnitVec3getDefaultPlaneNormal () const
Real getDefaultPlaneHeight () const
const Vec3getDefaultBallCenter () const
Real getDefaultBallRadius () const
const UnitVec3getPlaneNormal (const State &) const
Real getPlaneHeight (const State &) const
const Vec3getBallCenter (const State &) const
Real getBallRadius (const State &) const
Real getPositionError (const State &) const
Vec3 getVelocityError (const State &) const
Vec3 getAccelerationError (const State &) const
Vec3 getMultipliers (const State &) const
Real getNormalForce (const State &) const
 Return the signed magnitude of the normal force applied by the plane to the ball at the contact point, in the direction of the plane normal; negative indicates sticking.
Vec2 getFrictionForceOnBallInPlaneFrame (const State &) const
 Return the friction force vector being applied by the plane to the ball at the contact point, expressed in the plane frame.

Detailed Description

This constraint enforces continuous contact and non-slip rolling between a spherical surface fixed on one body and a half space (flat surface) fixed on another.

This requires one holonomic (position) constraint equation enforcing contact, and two nonholonomic (velocity) contraint equations enforcing the non-slip condition in the plane. Note that this is a bilateral constraint and will push or pull as necessary to keep the sphere in contact with the plane, and that rolling is enforced regardless of the amount of normal force begin generated. If you want to make this unilateral, you must handle switching it on and off separately; when this constraint is enabled it always enforces the contact and no-slip conditions.

We define the contact point on the ball to be the unique point CB on the sphere surface at which the radius vector is antiparallel to the plane's normal vector, that is, the point of the sphere directly below the sphere center if the plane's normal is considered the "up" direction. Then the contact point CP on the plane is defined to be the point on the plane that is directly below the center; that is, the intersection of the antiparallel radius vector and the halfspace surface. Note that in general CB != CP; the sphere contact point and plane contact point will be separated along the plane normal by a small distance, limited to the constraint tolerance after assembly. Now we define the contact point C=(CB+CP)/2, the point in space that is half way between the sphere's contact point and the plane's contact point. Equal and opposite forces are applied to the ball body B and the plane body P, at the station on each body that is coincident with C.

The holonomic constraint we enforce is that point C should be touching the plane. We enforce this with the condition that ~C_P*n_P = h, that is, given the contact point C measured and expressed in the plane body's frame, the height of that point in the direction of the plane normal should be the height of the plane.

The assembly condition is the same as the run-time constraint: the point of the sphere where the inward normal is the same as the halfspace normal must be brought into contact with the halfspace surface.


Constructor & Destructor Documentation

SimTK::Constraint::BallRollingOnPlane::BallRollingOnPlane ( MobilizedBody planeBody_P,
const UnitVec3 defaultPlaneNormal_P,
Real  defaultPlaneHeight,
MobilizedBody ballBody_B,
const Vec3 defaultBallCenter_B,
Real  defaultBallRadius 
)

Create a BallOnPlane constraint and define the default plane and ball geometry.

Default constructor creates an empty handle.


Member Function Documentation

Return the signed magnitude of the normal force applied by the plane to the ball at the contact point, in the direction of the plane normal; negative indicates sticking.

Return the friction force vector being applied by the plane to the ball at the contact point, expressed in the plane frame.


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