Specifications
166
0.00900900900 0.83799541478 -0.54567809793 0.00000000000
0.01001001000 0.83717626771 -0.54693420265 0.00000000000
0.01101101100 0.83626918423 -0.54832036673 0.00000000000
0.01201201200 0.83527365810 -0.54983594020 0.00000000000
0.01301301300 0.83418913820 -0.55148021065 0.00000000000
0.01401401400 0.83301408734 -0.55325177839 0.00000000000
0.01501501500 0.83174961018 -0.55515095782 0.00000000000
0.01601601600 0.83039421700 -0.55717631355 0.00000000000
0.01701701700 0.82894718724 -0.55932688186 0.00000000000
0.01801801800 0.82740776078 -0.56160163587 0.00000000000
0.01901901900 0.82577513921 -0.56399948535 0.00000000000
0.02002002000 0.82404848719 -0.56651927660 0.00000000000
The first column is time, and the subsequent columns are values of a kinematic measure. In general you can
have any number of columns, but in the case of marker trajectories the number of columns will be three,
corresponding to the x, y and z coordinates of the marker through space. The columns are separated by
spaces or tabs. The first line in the file is ignored if it does not contain numbers, so it can be used for a
header as is shown here.
Driving a pendulum
We need a model to work on. Please download and save the file mocap.any
in a working directory. Load the
model into AnyBody and open a new model view. You should see a vertical segment with a point in each
end. It is in fact a pendulum model linked to the global reference frame by a revolute joint at its upper end
point. We use this example because it is very simple and has a remote similarity with a human limb.
The pendulum only has one single degree of freedom. Let us presume that we have conducted a MOCAP
experiment that has tracked the movement of the end point of the pendulum and that we have saved the
marker trajectories on the file p1.txt
. Please download the file and save it in the same directory as
mocap.any.
The mocap.any model that you have downloaded cannot analyze because it is lacking a movement driver.
We are going to use the MOCAP trajectory saved in p1.txt to drive the model. The straightforward way to do
this would be to define a linear kinematic measure between the laboratory origin and the end point of the
pendulum and subsequently drive this measure by the measured trajectory. Let us do precisely that. Place
the cursor in the mocap.any file just below the Joint definition, click the Classes tab in the tree view on the
left hand side of the editor window, locate the AnyKinLinear class, right-click it, and insert a class template:
AnyRevoluteJoint Joint = {
AnyRefFrame &Ground = .GlobalRef;
AnyRefFrame &Pendulum = .Pendulum.Origin;
};
AnyKinLinear <ObjectName>
{
//Ref = -1;
AnyRefFrame &<Insert name0> = <Insert object reference (or full object definition)>;
//AnyRefFrame &<Insert name1> = <Insert object reference (or full object
definition)>;
};
}; // MyModel
Next we fill in the necessary information to point to the correct elements in the model:
AnyKinLinear P1Lin = {
//Ref = -1;
AnyRefFrame &LabOrigin = .GlobalRef;
AnyRefFrame &P1 = .Pendulum.P1;
};










