Gimbal lock and rotdriver errors

Hey, this is Kyle Imatani again, and I am running some final
auxilliary movement tests for my model using a combination of
interpol, fourier, and regular drivers.

One of my goals is to simply have the model peform 360 degree turns
around each axis – however turning around the y axis is not working
properly. It appears that whenever the model rotates to or initialized
in pi/2, 3*pi/2, and even at random instances, the model fails giving
me a kinematic constraints, taking too many iterations to solve.
I also recieve a warning about gimbal lock. After perusing the forum,
I still do not understand what it means or how to remove the problem.

Ideally, my goal is to achieve a uniform circular motion akin to a
figure-8 movement. I can achieve both circles independently, but
cannot put them together without recieving an error.

Thanks in advance,
~kyle imatani

Hi Kyle,

The troubles you experiment are effectively due to a Gimbal lock. It is a
quite complicated thing occurring in some special rotating configuration
like yours. I thing you can read a better explanation than I could do on
Wikipedia, here is a link http://en.wikipedia.org/wiki/Gimbal_lock .

Basically what happens is that some axis became parallel after the several
rotations, and the orientation of the object is not fully defined anymore.
The solution is to change the sequence of rotation of your axis, or to
modify the orientation of the measuring reference frame.

I can’t give much more indication without knowing the model. If you still
cannot solve it then please upload your model and we’ll have a look at it.

Best regards,

Sylvain, AnyBody Support.


From: anyscript@yahoogroups.com [mailto:anyscript@yahoogroups.com] On Behalf
Of kyleimatani
Sent: 22. august 2008 04:32
To: anyscript@yahoogroups.com
Subject: [AnyScript] Gimbal lock and rotdriver errors

Hey, this is Kyle Imatani again, and I am running some final
auxilliary movement tests for my model using a combination of
interpol, fourier, and regular drivers.

One of my goals is to simply have the model peform 360 degree turns
around each axis – however turning around the y axis is not working
properly. It appears that whenever the model rotates to or initialized
in pi/2, 3*pi/2, and even at random instances, the model fails giving
me a kinematic constraints, taking too many iterations to solve.
I also recieve a warning about gimbal lock. After perusing the forum,
I still do not understand what it means or how to remove the problem.

Ideally, my goal is to achieve a uniform circular motion akin to a
figure-8 movement. I can achieve both circles independently, but
cannot put them together without recieving an error.

Thanks in advance,
~kyle imatani

[Non-text portions of this message have been removed]

Sylvain,
Thanks again for your speedy response. I have just submitted my code
in a folder labeled imatani_work. I have remedied the problem by
closely approximating the inital iyy orientation to pi/2. Also by
significantly changing the movement drivers I can fix the warning. In
the future is there a better way to avoid this error, and is there a
solution if I would like the original pi/2 orientation?

Also when running the full muscle body simulation, it will NOT RUN. I
don’t thik it has to do with my drivers/model, but with how anybody
calculates and changes muscle position. Can you also look at this? Any
suggestions?
~kyle imatani

Hi Kyle,

It is good you managed to fix the problem of the gimbal lock.

The model fails to run because of wrapping error, the error message is the
following:

ERROR(OBJ1) :
C:\Users\sc\Documents\REPOSITORY\Rep.7.x.Trunk\Body\AAUHuman\Arm\Muscle.any(
1710) : ‘Flexor_Digitorum_Profundus__Digit3.SPLine’ : Number of allowed
iterations for contact solution has been exceeded in
Main.HumanModel.BodyModel.Right.ShoulderArm.Mus.Flexor_Digitorum_Profundus__
Digit3.SPLine

The system failed to calculate the muscle position on the wrapping surface.
One solution is to increase the number of contact points, if you click on
the error message it will open the Muscle file at the corresponding line,
here you have to increase the mesh number:

SPLine.StringMesh = 35; //25

I didn’t run the analysis until the end, if more similar errors occur this
usually solves this kind of problem. Please take care to not increase
excessively this number because the time computation will increase in
consequence. You can also try to modify slightly to position of the joint
where the muscle is wrapping, sometime 0.5 or 1 degree difference in the
joint position solve the problem.

I also noticed that the muscle activity is too high, starting 900% and
increasing. It seems the boundary conditions are not sufficient. For example
the hands on the handlebar are only supported in 2 directions, I think the
hands are making a full grip on it and should be supported (Reaction.Type =
On) in all 6 dof.

Best regards,

Sylvain, AnyBody Support.


From: anyscript@yahoogroups.com [mailto:anyscript@yahoogroups.com] On Behalf
Of kyleimatani
Sent: 25. august 2008 05:05
To: anyscript@yahoogroups.com
Subject: [AnyScript] Re: Gimbal lock and rotdriver errors

Sylvain,
Thanks again for your speedy response. I have just submitted my code
in a folder labeled imatani_work. I have remedied the problem by
closely approximating the inital iyy orientation to pi/2. Also by
significantly changing the movement drivers I can fix the warning. In
the future is there a better way to avoid this error, and is there a
solution if I would like the original pi/2 orientation?

Also when running the full muscle body simulation, it will NOT RUN. I
don’t thik it has to do with my drivers/model, but with how anybody
calculates and changes muscle position. Can you also look at this? Any
suggestions?
~kyle imatani

[Non-text portions of this message have been removed]