HOw to include my joint angles data into AnyBody?

Hi, AnyBody,

I have developed a standinglift model: full body model included with all cervical spine muscles. The joints and drivers also work fine.

I just used FAB system and collected the joint angles data (in degrees, my focus is cervical flextion, extention, lateral flextion, Trunk flextion and extention. The data also include force, torque, joint angular velocity and acceleration, power. Please see the attached .csv file.

The subject did such movements: standing, neck flextion, extention, lateral flextion, trunk bending.

I want to include the joint angles data to drive my full body AnyBody model to move as the subject did in the experiment.

I should convert the .csv to .txt file with joint angles data first. My problems here are:
(1) Do I need to include all the joint angles data in the text file, from column F to CZ?
(2) There are no marker data here. Where to include my text file in the model? JointsAndDrivers part? How?
(3) I read the FreePostureMove model, which is driven by joint angles.
But I did not see anywhere it includes joint angle text file. It uses “AnyKinEqInterPolDriver” function. I don’t understand how to apply the “timeseries” vector in the manequin file into my own model.

Will you please help me how to drive my full body model to move with the collected data? It is really challenging for me to solve this problem now.

Thanks a lot for your generous help!


Hi, AnyBody,

Will you please have a look whether I did in a right direction? If yes, I will keep it going and modify the model step by step.

Based on FreePostureMove model, I focused on the cervical spine part modifications:

(1) in the “Mannequin.any” file:

AnyVector CervicalTime = TimeSeries2;

// ?? Here, I have no idea which one to choose: 6 2, or 3 elements, which is TimeSeries, TimeSeries2, or TimeSeries3?///

AnyVector CervicalFlexion = {0, 0};
AnyVector CervicalExtension = {0, 0};
AnyVector CervicalLateralFlexionLeft = {0, 0};
AnyVector CervicalLateralFlexionRight = {0, 0};
AnyVector CervicalRotationLeft = {0, 0};
AnyVector CervicalRotationRight = {0, 0};

// If I should choose TimeSeries, these above values should be changed to {0,0,0,0,0,0}; //

(2) in the “InterPolationFunctions” file:

AnyFunInterpol CervicalFunction = {
Data = (pi/180)* { .JntPos.CervicalFlextion, .JntPos. CervicalExtension, .JntPos. CervicalLateralFlexionLeft, .JntPos. CervicalLateralFlexionRight, .JntPos. CervicalRotationLeft, JntPos. CervicalRotationRight};
T = .JntPos.CervicalTime;
Type = PieceWiseLinear;
// Since my .csv data has such 6 angles for cervical spine part. //

(3) in the “InitialPositionValues” file:

AnyVector Cervical = .JointPos.CervicalFunction(Main.Study.tStart);
AnyVector CervicalFlexion = (180/pi) * Cervical[0];
AnyVector CervicalExtension = (180/pi) * Cervical[1];
AnyVector CervicalLateralFlexionLeft = (180/pi) * Cervical[2];
AnyVector CervicalLateralFlexionRight = (180/pi) * Cervical[3];
AnyVector CervicalRotationLeft = (180/pi) * Cervical[4];
AnyVector CervicalRotationRight = (180/pi) * Cervical[5];

(4) in the “JointsAndDrivers” file:

// Cervical Drivers
AnyKinEqInterPolDriver CervicalDriver = {
AnyKinMeasureOrg &Ref1 = …HumanModel.Interface.Trunk.CervicalFlexion;
AnyKinMeasureOrg &Ref2 = …HumanModel.Interface.Trunk.CervicalExtension;
AnyKinMeasureOrg &Ref3 = …HumanModel.Interface.Trunk.CervicalLateralFlexionLeft;
AnyKinMeasureOrg &Ref4 = …HumanModel.Interface.Trunk.CervicalLateralFlexionRight;
AnyKinMeasureOrg &Ref5 = …HumanModel.Interface.Trunk.CervicalRotationLeft;
AnyKinMeasureOrg &Ref6 = …HumanModel.Interface.Trunk.CervicalRotationRight;

// I have no idea what (or where to refer) I should define the AnyKinMeasureOrg in the above lines. Another question is: the MaxForceNeck model have cervical drivers for flexion, lateral bending, and rotation, which are in different data structure with the .csv data what I got from the experiment. What I can do to deal with these problems? //

T = .JntPos.CervicalTime;
Type = PieceWiseLinear;
Reaction.Type = { Off, Off, Off, Off, Off, Off };

If I am doing in a correct direction, I hope you can help me with the problems above. If not, also please guide me!

Thanks a lot!

Best regards,



I come again! It was so painful to debug the model.

I am thinking one way to work it forward.

In the JointsAndDrivers.any file, I will do this the same as in the Lunge example model:

//Neck driver
AnyKinEqSimpleDriver NeckJntDriver = {
AnyRevoluteJoint &T12L1Joint = …HumanModel.BodyModel.Interface.Trunk.NeckJoint;
DriverPos = pi/180*{.JntPos.NeckExtension};
DriverVel = pi/180*{.JntVel.NeckExtension};
Reaction.Type = {Off};

// Add other neck drivers: NeckFlexion, NeckLateralBending, NeckRotation here. But how to create such drivers like NeckExtension driver, which is different from MaxForceNeck example’s cervical spine drivers?

/// This driver uses the optimized joint angles to move the model.
AnyKinEqInterPolDriver Jntdriver = {
Type = Bspline;
BsplineOrder = 4;
FileName = “output-euler.txt”;

// Here, I will extract all joint angles data into a text file, starting with the t time data in the first column.
// But I don’t understand why “output-euler.txt” has 19 columns data, and the first column is the time. What are the 18 data standing for, in detail? I found more than 18 joints angles from Mannequin.any file.

AnyKinMeasureOrg &meas = .JointMeasures;


If this way is correct, it should be easy next.

Looking forward to your reply! Thanks a lot!



Don’t need to reply to this thread any more. Thank you!