Model trouble shooting

From AnyScript.org - Wiki

Jump to: navigation, search

Contents

Object already declared error

This is a loading error, typically this occurs when you load a model and you have declared two times the same object in the same folder. To resolve the matter remove one of these objects or rename it. You can click on the links in the error message to locate the lines in the script.

Resolve kinematic problems

  1. Make a sketch on how the model is driven and try to imagine what possibly could cause the problem.
  2. If the kinematic error occurs in step 0, try to improve the starting conditions
  3. Try to omit parts of the model like the arms or legs to detect where the root of the problem is located
  4. If the model contains closed chain kinematics, replace these closed chains with joint drivers on the human. With all the closed chain kinematics removed, the model should run kinematically
  5. Re-insert the closed chain constraints (in this case the marker drivers) one by one and remove joint drivers accordingly, making sure that a working model is maintained. This will make it easier to locate the problem.

Make the solution of the inverse problem stable?

Sometimes it can cause troubles to resolve recruitment errors. In general recruitment errors can be caused by an inadequate muscles configuration or missing constraints, that leaves one or several dof. in the model unsupported. The way to resolve this kind of error is to introduce constraints to the joints until it becomes stable; this allows you to detect which dof. is causing the problem, and once this is detected you can address the right solution for it. Unfortunately sometimes you may also see recruitment errors due to numeric instability, this problem will be reduced significantly with the next version of the AnyBody Modelling system. Usually the easiest way to resolve this problem is to introduce a small amount of gravity to the zero gravity directions, this usually cures the problem. The problem has been seen on problems where a certain dof is entirely unloaded. This may create a kind of singularity in the model which can be reduced by adding the small amount gravity. When using the 3 elements muscle model a current problem is to froget to run the calibration sequence. Remenber to select RunApplication in the operation tree to run the calibration.

Resolve penetration errors

Many muscles in the body are wrapped over bones and slide on the bony surfaces when the body moves. This means that the contact forces between the bone and the muscle are always perpendicular to the bone surface, and the muscle may in fact release the contact with the bone and resume the contact later depending on the movement of the body. Via point muscles are not capable of modeling this type of situation, so the AnyBody Modeling System has a special muscle object for this purpose.

A wrapping muscle is presumed to have an origin and an insertion just like the via point muscle. However, instead of interior via points it passes a set of surfaces. If the surfaces are blocking the way then the muscle finds the shortest geodesic path around the surface. Hence the name of the class: AnyShortestPathMuscle. The fact that the muscle always uses the shortest path means that it slides effortlessly on the surfaces, and hence there is no friction between the muscle and the surface.

Sometimes one or some of the points defining a muscle turn out to be located inside one of the surfaces that the muscle can wrap on. In general this should be avoided because a part of the muscle path will be located inside the surface and this part of the path becomes unpredictable.

The penetration errors can occur at different times:

  1. They may happen at load time when the model is in its initial position. If they only occur in this position they are not important. It just means the initial posture creates penetration.
  2. They may occur when running inverse analysis of the model. This can be important.

There can be different reasons for this, including:

  1. If for example the arm is penetrating the thorax this may give a penetration warning. This is not an error related to the Body model but related to the way the model is being used. Here the remedy is to change the drivers of the model.
  2. In principle all surfaces in the model used for wrapping have been made in a way that makes them scale with the model. When defining a cylinder it is typically defined using three nodes. These nodes control the size and location of the cylinder. When the bone is scaled, these control nodes will also be scaled like any other node on the bone and consequently the cylinder will be scaled too. Ellipsoids are made in a similar way. This setup does not guarantee that penetration errors will never occur. If the via point and the surface are located on the same bone and are very close, different types of scaling and sizes could potentially create penetration errors.

In general the remedy is to

  1. Exclude all muscles from the model except the one causing the problem.
  2. Insert an AnyDrawParamSurface in the surface being penetrated to visualize it you can do this directly in the muscle. Typically by writing Surf1={ AnyDrawParamSurf drw={}; }; //assuming a Surf1 reference is existing!
  3. Insert an AnyDrawRefFrame in the node which is penetrating.
  4. Try to understand the root of the problem, whether it is related to scaling or motion.
  5. Do modifications on either model or motion to solve the problem
Personal tools