-- DanielSantos? - 20 Aug 2004

Parametric Contact Modeling

Parametric contact modelling (PCM) is a way to provide the RiSE project with a set of arbitrarily complex contact models. The inability of simple Coulomb friction models to capture effects such as adhesion, claw-substrate interaction, etc. necessitates the creation of new contact models to be used for analysis, simulation, control, etc.. In general, these new models will describe the interaction between any two arbitrary objects. Specifically for the RiSE project, the PCM will describe the interaction between feet of the RiSE platform and climbing substrates. The PCM encompasses a number of different tasks. Models that accurately reflect the real physical behavior of interactions must be created. These models must be evaluated against current literature on the subject and various on-going experiments in the RiSE project. Finally, the PCM must also interface to the simulation environment in order to be useful for purposes of control and robot design.

ArachiSimulation

The PCM interfaces to the current simulation environment through a C++ library of functions. There are two levels at which the user may interact with the PCM.

Simple

If the user only needs contact models that have already been written into the library then all that is required is a simple text file (eg. filename.pcm ). The text file specifies what contact models should be used for what pairs of objects or surfaces. Each type of contact model takes as inputs various parameters that will describe its behavior. First, the user must create contact models by specifying what type of contact model and with what parameters. Second, the user then assigns contact models to pairs of objects or surfaces. An example of a "pcm" file is below.

Example File:

   # Commented lines must begin with a #
   # First create the contact models using the following format
   # ContactType <ContactName> = <ModelType> [{ <ParameterName=ParameterValue; ParameterName=ParameterValue; ...> }];
   
   ContactType   C0 = DefaultContact [{ Error=1e-3; }];
   ContactType   C1 = SpringContact [{ X_Limit=1000.0; Y_Limit=1000.0; Z_Limit=5.0; K=1000.0; B=10.0; LogFile="mylog"; Resolution=.001; }];
   
   # Second, assign the contacts that you just created to pairs of objects or surfaces, using the following format
   # SurfacePair <SurfaceName1> * <SurfaceName2> -> <ContactName>;
   # ObjectPair <ObjectName1> * <ObjectName2> -> <ContactName>;
   # Note that object pairs take precedence over surface pairs
   
   SurfacePair   Normal * Glass -> C0;
   SurfacePair   Sticky * Glass -> C1;
   ObjectPair    FrontRightFoot * Ground -> C0;
   ObjectPair    FrontRightFoot * Wall -> C1;

The ModelTypes must correspond to the names of the different types of contacts in the PCM library, as with the ParameterNames for each type of contact. The SurfaceNames and ObjectNames must correspond to the names given by the user in the Creature Description Language (CDL). The above pcm file is all that is needed to begin using the PCM Library.

Complex

If functionality that the user requires is not already provided in the PCM Library then the user must provide that functionality themselves by writing it into the library. Users can create their own or modify existing contact types, however, this can only by done by writing software in C++ and re-compiling the PCM Library. The following is a general description of the structure of the PCM Library and how to create or modify contact models. It is assumed that the user has a working knowledge of C++.

In the PCM Library, there is an Abstract Base Class called Contact. From this class, all actual contact models are derived. The Contact class provides a set of functions and stores data that are common to all types of contacts. Some of the data that this class keeps track of includes the contact normal, the contact point in the world's coordinate system, and the frame transformation information between the two objects in contact. The class also has methods to perform logging of data, print debugging information, and can provide flags when the two objects in contact become physically separated by more than some user-specified distance.

The Contact Class has 4 basic parts:

  • establish - This routine initializes various variables, sets up files for logging, etc. that are common to all contact types. This method must be overloaded in derived classes.
  • update (internal) - This is a special update routine called by the simulation environment directly. It has the ability to update certain parameters of the contact such as the contact normal and the point of contact that the PCM cannot otherwise obtain.
  • update - This routine can perform updates and manipulations on parameters that are stored in the Contact Class but cannot easily gain access to simulation data in general. This update routine will return False (possibly a signal for termination) when the two objects in contact become separated by more than a user-specified distance. This method must be overloaded in derived classes.
  • terminate - This routine deletes various components of the contact, removes any constraints, and otherwise destroys the contact between the two objects. This method must be overloaded in derived classes.

Actual contact models get implemented in classes derived from the Contact class. It is in these classes that the "guts" of a contact model get implemented. Each of these classes has 3 basic parts:

  • establish - This routine gets called when the PCM detects that two objects have made contact. This routine should first call the establish method of the Contact base class. Then, the user must specify all the actions that must take place to create the contact model. The user may wish to create "helper classes" in order to implement such elements as springs and dampers and may do so as they see fit.
  • update - This routine gets called by the PCM at a fixed time step equal to the integration step of the simulation environment. This routine should first call the update method of the Contact base class. The user must perform all necessary update steps for the contact type. This may include checking thresholds on values, applying forces to objects, creating or breaking constraints, etc. When it is time to destroy the contact, this method must return a boolean False.
  • terminate - This routine gets called by the PCM when it is time to terminate a contact (last update returned False). This routine should delete any instances that were created, remove any forces being applied to the objects in contact, etc.. This routine should also call the terminate method of the Contact base class before exiting so that it too can perform its "cleanup".

Using this general format, any user can create arbitrary contact models and then use them in the simulation environment through the pcm text file.

PCMModelTypes - List of the actual Model Types that are currently implemented in the PCM

 
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