Modelling Bipedal Stance Using Conditional Contact - KKT error

Hello everyone,

I am quite new here, working with AnyBody to develop a simulation of human standing in different, programmable poses. I need my model to output the body geometry along with ground reaction forces for both feet.

In my attempts to simulate the ground contact realistically, yet in a simple way, my model employs four conditional contact points, two per foot - located at the heel and big toe of each one of them.

I implemented the stance control such that the user selects the location of heels, and the angular orientation of feet with respect to the x axis of the fixed reference frame. I programmed drivers which keep feet in these locations, serving as hard constrains. Moreover, I introduced a driver that keeps the body CoM’s X and Z coordinates in the geometric centre of the base of support.

With these constrains I want the inverse dynamics to optimize the force distribution between the four contact points.

The problem is that for most configurations a notorious KKT error strikes, and I cannot diagnose its origin. So far my observations are:

  1. There is a certain range of postures (eg. when feet are less than 0.7 m apart), when the inverse dynamics works and gives reasonable force distribution - exactly what I want to achieve.

  2. When the body muscles are taken out of the model and all body joints given the “Reaction.Type={On}”, this stable range diminishes significantly.

  3. At any other position, the KKT error pops out.

I tried changing the “muscle force” at the conditional contacts, ran through all possible combinations of “Reaction.Type” setups, and I just cannot find any explanation why my model fails. I even made an initial attempt to follow the suggestions in this paper (see the NumStabMuscles.any file) - with no effect:

http://www.sciencedirect.com/science/article/pii/S0021929014002516#

To improve numerical stability, additional muscle-like actuators were attached at the origin of the pelvis segment, which could generate small residual forces and moments up to 10 N or Nm. The activation level of these muscles was solved as part of the muscle recruitment optimization problem, so as to minimize their contribution.

I would be extremely grateful for any suggestions.

I attach all the files necessary to recreate my model in the .zip file in this post. When open, several points of different colours should be seen along with the body:

Red - desired position of the heels (modifiable through Mannequin)
Green - final position of the toes (computed from heel position and foot orientation)
Blue - the point the body CoM will be kept over (nominally the geometric center of the base of support, but the offset can be introduced in the Mannequin file)
Magenta - unrelated. These are the points I need for further data processing outside of AnyBody. They should cause no problem.

If you need any of my files commented in larger details, or any other information that could facilitate your understanding of what I have done wrong, please let me know.

Thank you very much for any help in advance.

Jakub Sikorski

Ps. I use AnyBody v. 6.0.3 along with AMMR v. 1.6

Dear Jakub Sikorski,

I tried to analyze your model and tried to modify something on that to make it working.

  1. First, I would set all the ‘Reaction.Type’ of the constraints as ‘Off’.

  2. You have used only two points on each foot for conditional contacts.
    Sometimes two points may not be enough to generate the necessary reaction moments on the foot. So we usually recommend to use at least 3 points on the foot for conditional contacts.
    So I added one more conditional contact on each foot(ToeMedialContactNode).
    But if you don’t mind then you can also add one more conditional contact using the ‘ToeLateralContactNode’.

  3. Pelvis residual forces are usually used for gait analysis with measure force data to correct the inconsistency between the real subject and the computational model (due to body-segment parameter errors, motion capture marker error, force plate error and so on).
    But in this kind of model you don’t need to use that pelvis residual forces.

I hope this may be helpful to you.

Best regards,
Moonki

Dear Moonki,

Thanks a lot! I did not know that the solution is so simple. The model works exactly as I want it to.

Jakub