INRIA
BIPOP

-----------------------
Tutorial
-----------------------

ComputeContactForces

This function computes the interaction force at each point of contact, and for each simulation time. What it does is basically:

  • (Re)compute the actuation torques with the [zdot, Torques] = ActuationDynamics(t, q, qdot, z, state) function.
  • Then the acceleration qddot is computed with [qddot] = LagrangianDynamics(t, q, qdot, Torques, ContactState).
  • Finally the contact forces with [Lambda] = ContactForces(q, qdot, qddot, Torques, ContactState).
    ContactForces
    This function seeks for each point of contact the interaction force the most inside the friction cone by solving a linear optimization problem.

These steps are repeated for all the simulation times and each vector Lambda computed this way is stored as a column of the matrix LAMBDA. Each vector Lambda contains first the X components of all the contact forces, then the Y components and finally the Z components, in that strict order.


Visu and CreateVRML

These two functions do the same thing, they draw a 3D animation of the model for the motion simulated beforehand. The interaction forces at each contacting solid are drawn at the corresponding centers of pressure and the sum of the interaction forces is drawn at the global center of pressure.
The Visu function defined in the LagrangianDynamics/*Name* module/directory realizes this animation with Scilab functions and produces a stick figure animation, while the CreateVRML function defined in the LagrangianDynamics directory produces a full 3D animation in a VRML file, much nicer to look at. Some results of simulation obtained with HuMAnS are available in the screenshots section of the site. For all the models distributed with the HuMAnS toolbox, the basic '.wrl' files used to produce these VRML animations are provided, but if you want to develop your own model you will need to make the definition of this VRML model on your own.


The Spy function

This function is here to give some informations to the user during the computation of the simulation. At times defined by the SpyPeriod parameter, it calls the function Visu and instead of passing data matrices as inputs it only gives vectors so that it is not an animation that appears but just a single picture of the state of the system at a given time.


Last modification: 2007-03-06 14:20:22.176715000 +0100