# How can one the euler angles order? ...

About the euler angles the Manual "AnyBodyRefManual.pdf " says:

AnyKinRotational
Type: Creatable
Base Class: AnyKinMeasureReal (see p. 147)
Description:
This “kinematic measure” measures 3-D orientation/rotations. It
measures either the rotation of a single reference frame with respect
to the global frame or the relative rotation one frame,
frame ‘1’,with respect to another, frame ‘0’.
Possible rotational quantities are determined by the member Type,
which is an enum of AnyKin-RotationalType. This allows you to chose
the following quantities as output: Cardan angles (Type =
RotAxesAngles): Cardan angles measure a 3-D rotation by three angles
of planar rotation about the reference system’s axes. One should be
aware that the sequence of these rotations is important, and that any
rotation subsequent to the first is a rotation about a local axis
arising from the previous rotation(s)…
â€¦.

The concept is clear: the transition from one coordinate system to
the other is achieved by a series of two-dimensional rotations. The
rotations are performed about coordinate system axes generated by the
previous rotation step (the step-by-step procedure).
The convention that we use is, for example, Rot (Z,Y,X), means:

Firstly we rotate RotZ about the Z axis of the initial coordinate
system (global reference system of the PELVIS, Axis XYZ). After,
about the Y’ axis of this newly generated coordinate system, a
rotation by RotY is performed, followed by a rotation by RotX about
the new X’’ axis.

We use the euler angles in the following files:

• MannequinValuesFromModel.any (see below)
• JointsAndDrivers.any (see below)
• Mannequin.any (In this file we introduce the movement) (see below)
• \BRep\Aalborg\Spine\interface.any
• \BRep\Aalborg\Arm3D\interface.any
• \BRep\Aalborg\Leg3D\interface.any

But, what is the file where we can consult or modify the order about
Euler Angles?
We think in “interface.any” file but we don’t sure and we don’t fully
understand the syntax of script. Does the definition of Mannequin.any
file to affect or influence in the Euler angles order?

From file: \BRep\Aalborg\Spine\interface.any

AnyKinMeasureOrg PelvisRotX ={
AnyKinRotational rot ={
AnySeg &ref2 =…Trunk.SegmentsLumbar.PelvisSeg;
Type=RotAxesAngles;
};
MeasureOrganizer={2};
};
AnyKinMeasureOrg PelvisRotY ={
AnyKinRotational &ref=.PelvisRotX.rot;
MeasureOrganizer={1};
};
AnyKinMeasureOrg PelvisRotZ ={
AnyKinRotational &ref=.PelvisRotX.rot;
MeasureOrganizer={0};
};

What is its meaning?
1Âº Rotation: RotZ -> PelvisRotZ (flexion)
2Âº Rotation: RotY -> PelvisRotY (Rotation)
3Âº Rotation: RotX -> PelvisRotX (lateral bending)
Is it right?
If we would like to change the order (normally the rotation is the
last).
Is it sufficient to change “MeasureOrganizer” variable? for example:

AnyKinMeasureOrg PelvisRotX ={
AnyKinRotational rot ={
AnySeg &ref2 =…Trunk.SegmentsLumbar.PelvisSeg;
Type=RotAxesAngles;
};
MeasureOrganizer={1};
};
AnyKinMeasureOrg PelvisRotY ={
AnyKinRotational &ref=.PelvisRotX.rot;
MeasureOrganizer={2};
};
AnyKinMeasureOrg PelvisRotZ ={
AnyKinRotational &ref=.PelvisRotX.rot;
MeasureOrganizer={0};
};

Do we have to change in other file?

My files are the following:

>>>>>>>>>> MannequinValuesFromModel.any

AnyFolder MannequinValuesFromModel = {

AnyFolder &FolderRef=Main.Model.HumanModel.Interface;
AnyFolder AnyFolder_Posture = {
//This controls the position of the pelvi wrt. to the global
reference frame
AnyVar AnyVar_PelvisPosX=.FolderRef.Trunk.PelvisPosX.Pos[0];
AnyVar AnyVar_PelvisPosY=.FolderRef.Trunk.PelvisPosY.Pos[0];
AnyVar AnyVar_PelvisPosZ=.FolderRef.Trunk.PelvisPosZ.Pos[0];

`````` //This controls the rotation of the pelvis wrt. to the global
``````

reference frame
AnyVar AnyVar_PelvisRotX=.FolderRef.Trunk.PelvisRotX.Pos[0]
*180/pi;
AnyVar AnyVar_PelvisRotY=.FolderRef.Trunk.PelvisRotY.Pos[0]
*180/pi;
AnyVar AnyVar_PelvisRotZ=.FolderRef.Trunk.PelvisRotZ.Pos[0]
*180/pi;
â€¦

>>>>>>>>>>>> JointsAndDrivers.any

// ************************************
// Drivers for attaching the pelvis to the global reference system
// ************************************

AnyKinEqInterPolDriver PelvisGroundDriver ={
AnyKinLinear lin ={
AnyFixedRefFrame &ref1 =…EnvironmentModel.GlobalRef;
AnySeg &ref2 =…HumanModel.Trunk.SegmentsLumbar.PelvisSeg;
};
AnyKinRotational rot ={
AnyFixedRefFrame &ref1 =…EnvironmentModel.GlobalRef;
AnySeg &ref2 =…HumanModel.Trunk.SegmentsLumbar.PelvisSeg;
Type=RotAxesAngles;
};
Data={
.JntPos.PelvisPosX,
.JntPos.PelvisPosY,
.JntPos.PelvisPosZ,
pi/180*.JntPos.PelvisRotZ,
pi/180*.JntPos.PelvisRotY,
pi/180*.JntPos.PelvisRotX
};
T=.JntPos.PelvisPosTime;

`````` Type=Bspline;
BsplineOrder = 8;  // This provides smooth accelerations
//Type=PiecewiseLinear;

Reaction.Type={On,On,On,On,On,On};
``````

};

>>>>>>>>>>>>>>>>>> Mannequin.any

AnyFolder Mannequin ={
AnyFolder Posture ={
AnyVector PelvisPosTime = {3.16, 3.36, 3.56, 3.76, 3.96, 4.16, 4.36,
4.56, 4.76, 4.96};
AnyVector PelvisPosX = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
0.0};
AnyVector PelvisPosY = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
0.0};
AnyVector PelvisPosZ = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
0.0};
AnyVector PelvisRotTime = {3.16, 3.36, 3.56, 3.76, 3.96, 4.16, 4.36,
4.56, 4.76, 4.96};
AnyVector PelvisRotZ = {-40.37, -55.99, -69.65, -78.86, -82.19, -
82.19, -82.19, -82.19, -82.19,

-82.19};
AnyVector PelvisRotX = {41.45, 53.78, 63.93, 70.34, 72.55, 72.55,
72.55, 72.55, 72.55, 72.55};
AnyVector PelvisRotY = {-35.96, -38.42, -38.33, -37.2, -36.58, -
36.58, -36.58, -36.58, -36.58,

-36.58};

Thank you very much in advance.

Javier Marin