-- DanielSantos? - 25 Aug 2004

PCM Model Types

This page contains a list and description of each of the Model Types currently implemented in the PCM.


Base Contact Class

This is the abstract base class from which all contact model types are derived.

Main Methods

  • establish( void ) - Establishes the contact. Must be overloaded in derived types. Should be called upon entering establish methods of derived types. Returns True if a successful establish occurred. Returns False if establish failed or contact was already established.
  • update( DeContactEvent
    *
    event )
    - Internal update method. This special update method gets called by the simulation environment and should never be called in derived types. It updates various contact parameters that the PCM cannot easily access through other means.
  • update( void ) - Updates the contact. Must be overloaded in derived types. Should be called in the update methods of derived types. Returns True if the update succeeded. Returns False if the update failed. Updates in the base Contact class only fail if the two objects become separated by more than a user-specified distance.
  • terminate( void ) - Terminates the contact. Must be overloaded in derived types. Should be called before exiting the terminate methods of derived types. Returns True if the termination succeeded. Returns False if the termination failed.

Other Methods

Below is a description of the various methods it provides for the derived types.

  • pose( void ) - Returns the frame description in space of Object A's frame relative to Object B's frame.
  • relpose( void ) - Returns the frame description in time of Object A's frame in Object B's frame at the current time relative to Object A's frame in Object B's frame at the initial time of impact.
  • velocity( void ) - Returns the velocity of Object A relative to Object B
  • getForce( void ) - Returns the forces acting at the contact in the ContactFrame
  • getObjectA( void ) - Returns a pointer to Object A
  • getObjectB( void ) - Returns a pointer to Object B
  • getInitialPosition( void ) - Returns the initial point of contact in the Global reference frame.
  • getPosition( void ) - Returns the current point of contact in the Global reference frame.
  • getInitialNormal( void ) - Returns the initial contact normal vector in the Global reference frame.
  • getNormal( void ) - Returns the current contact normal vector in the Global reference frame.
  • getNormalForce( void ) - Returns the compressive normal force acting along the contact normal.
  • getGlobalX( void ) - Returns the X-axis of the ContactFrame in the Global reference frame.
  • getGlobalY( void ) - Returns the Y-axis of the ContactFrame in the Global reference frame.
  • getGlobalZ( void ) - Returns the Z-axis of the ContactFrame in the Global reference frame.
  • getLocalX( void ) - Returns the X-axis of the ContactFrame in Object B's reference frame.
  • getLocalY( void ) - Returns the Y-axis of the ContactFrame in Object B's reference frame.
  • getLocalZ( void ) - Returns the Z-axis of the ContactFrame in Object B's reference frame.
  • printInfo( void ) - Prints various debugging information to the terminal at a periodic rate.

Parameters

All model types inherit the following parameters.

  • Error - The Error parameter is used by the update routine to determine when to return a false and when to return a true. The base Contact update method uses this value as a threshold to compare against the actual closest distance between the two objects in contact. If the objects are separated by more than Error then the update method returns a False.
    • IMPORTANT: If Error parameter is not specified, then the update routine defaults to using Arachi's internal method for determining whether or not two objects should be considered to be physically in contact. For some model types it will be necessary to specify an Error parameter, for others it will be necessary to leave the Error parameter unspecified so that Arachi's default method is used, and for others it will not make a difference. Look at the documentation for each model type to determine how to use the Error parameter.


DefaultContact

Default Contact type. This model is basically just a place holder that allows the ArachiSimulation to handle the contact modelling. Arachi's native contact modelling performs the following:

  • Application of a Coefficient of Restitution
  • Coulumb friction, both static and dynamic
  • Viscous damping
The Arachi contact model requires 4 parameter inputs, namely the coefficient of restitution, the static coefficient of friction, the dynamic coefficient of friction, and the viscous damping coefficient. These parameters are NOT specificed in the PCM contact model. These parameters must be specified in the surface properties of the object. The Creature Description Language has a description of how to input these parameters through the .cdl files. This model type is most useful as a template for users to use when creating new model types.

Main Methods

  • establish( void ) - Does nothing.
  • update( void ) - Does nothing.
  • terminate( void ) - Does nothing.

Parameters

  • Error - Error parameter does not affect the behavior of this model.


OrientationContact

Orientation-based Contact type. This is a very simple model in which the origin of Object A's local frame becomes fixed with respect to Object B. Only rotations of Object A about its origin are allowed. The constraint is added based on the angle between Object A's frame and Object B's frame. The model can be "global", in which case the constraint is only added when Object A's frame lines up with Object B's frame within some specified range of angles of rotation. In this case, attention must be paid when defining the coordinate frames of Object A and B. The model can also be "relative", in which case the constraint is always added upon detection of contact, and the constraint is removed when the two objects have rotated past some angle threshold with respect to the orientation they were in when contact was first made. This model type should only be used with a "foot" that is modeled as a sphere. Other geometries may over-constrain the contact and make it impossible for the "foot" to become free again.

Main Methods

  • establish( void ) - Calculates angle between two objects and may constrain Object A depending on angle and on global/relative parameter.
  • update( void ) - Checks the angle between two objects and compares with threshold and global/relative parameter.
  • terminate( void ) - Removes the constraint.

Parameters

  • Global - Flag to use "global" verson or "relative" verson. Value - A boolean, true or false. Default is true.
  • Angle - Angle threshold used to determine if there should be a constraint or not on Object A. If global is on, then the angle between Object A's frame and Object B's frame, calculated using axis/angle formulation, must be less than this value for Object A to be constrained. If relative is on, then the change in angle orientation between A and B from when they initially made contact must be less than this value for Object A to be constrained. Note that in relative mode, Object A is always initially constrained upon contact. Value - A number in Radians.
  • Error - Error parameter should be specified. If there tends to be a lot breaking/making contacts (should only occur in relative case) then the Error parameter should be increased.


SpringContact

Spring Contact type. This model attempts to fix the contact rigidly. Object A becomes connected to Object B through a set of spring/damper pairs. The contact "breaks" when the force acting in certain directions exceeds some user-specified threshold value. These virtual spring/dampers act along the primary axes of the ContactFrame. These spring/dampers are connected to the objects at the initial point of contact. i.e. This model can be thought of as a "rubber band" that connects a point on Object A to a point on Object B. The point on either object is the initial contact point.

  • NOTE: As of 9/3/04, this model can exhibit errors when the "Wall" parameter is set to true. Forces will be applied correctly at all times, but will be recorded incorrectly. This bug currently has no fix.

Main Methods

  • establish( void ) - Creates 5 (or 6) unilateral spring/damper pairs in the ContactFrame axes. The 6th unilateral constraint can be either a spring/damper pair or the default unilateral constraint implemented by Arachi to prevent penetration between the two objects.
  • update( void ) - Checks the forces acting along each axis of the ContactFrame agains the thresholds.
  • terminate( void ) - Deletes the spring/damper pairs and "frees" the objects.

Parameters

  • X_Limit - Force threshold limit in the X direction for breakaway. Value - A number in Newtons
  • Y_Limit - Force threshold limit in the Y direction for breakaway. Value - A number in Newtons
  • Z_Limit - Force threshold limit in the positive Z direction for breakaway (infinite compression into the wall is allowed). Value - A number in Newtons
  • K - Stiffness of the springs. Value - A number in (Newtons / meter)
  • B - Damping of the dampers. Value - A number in (Newton * seconds / meter)
  • Wall - Flag whether or not to leave wall in place or replace with spring/damper pair. Value - A boolean, true or false. Default is true.
  • LogFile - Text file used for logging data. If none is specified, no logging takes place. File is created if non-existant. File is overwritten if already exists. Value - A string in quotation marks, e.g. "test1.log"
  • Resolution - Time resolution to use when logging data to data file. Value - A number in Seconds
  • Error - Error parameter should NOT be specified for proper behavior of this model. Arachi default method should be used because Arachi will be calculating the Normal force between the objects when the "Wall" parameter is set to true.


NonIsoFrictionContact

Non-Isotropic Friction Contact type. This model allows for the use of non-isotropic Coulomb friction. The coefficient of friction depends on the local velocity heading of Object A with respect to Object B. Static and dynamic coefficients of friction are the same. Coefficients of friction in the 4 cardinal directions in the plane parallel to the contact normal must be specified. The actual coefficient of friction is achieved through a linear interpolation between the 4 cardinal directions using the angle of the velocity heading in the plane paralle to the contact normal (see ContactFrame). Error parameter should be specified. Evaluation and application of friction forces is done by the Arachi Simulation.

Main Methods

  • establish( void ) - Overrides any friction coefficients that were in place for the two objects making contact. Calculates the new non-isotropic coefficient of friction and sets it for the Arachi simulation.
  • update( void ) - Calculates the coefficient of friction to use based on the velocity heading and sets it in the simulation.
  • terminate( void ) - Returns the friction coefficients to there values before contact occurred (for use with contact on other surfaces).

Parameters

  • Xmu_Pos - Coefficient of friction in the positive X direction (see ContactFrame). Value - A number, no units.
  • Xmu_Neg - Coefficient of friction in the negative X direction (see ContactFrame). Value - A number, no units.
  • Ymu_Pos - Coefficient of friction in the positive Y direction (see ContactFrame). Value - A number, no units.
  • Ymu_Neg - Coefficient of friction in the negative Y direction (see ContactFrame). Value - A number, no units.
  • LogFile - Text file used for logging data. If none is specified, no logging takes place. File is created if non-existant. File is overwritten if already exists. Value - A string in quotation marks, e.g. "test1.log"
  • Resolution - Time resolution to use when logging data to data file. Value - A number in Seconds

  • Error - Error parameter should NOT be specified. Arachi default method should be used because Arachi will be calculating friction forces.

 
This site is powered by the TWiki collaboration platformCopyright &© by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback