Specifications

167
We now have a linear measure that is in fact a three-dimensional vector from the origin of the global
reference frame to the end point of the pendulum. But so far we are only measuring the vector. The next
step is to actually drive it by the measured trajectory. We do so by introducing an interpolation driver. Place
the cursor right below the linear measure, go to the class tree, locate the AnyKinEqInterPolDriver class, and
insert a class template in the model:
AnyKinLinear P1Lin = {
//Ref = -1;
AnyRefFrame &LabOrigin = .GlobalRef;
AnyRefFrame &P1 = .Pendulum.P1;
};
AnyKinEqInterPolDriver <ObjectName>
{
//MeasureOrganizer = ;
Type = ;
//BsplineOrder = 4;
//T = ;
//Data = ;
//FileName = "";
//AnyKinMeasure &<Insert name0> = <Insert object reference
(or full object definition)>; You can make any number of these objects!
};
The interpolation driver allows you to either type the vector of interpolated values directly into the AnyScript
file, or to read the data off an external file. It would be very messy to have all the MOCAP'ed data directly in
the AnyScript model, so we opt for reading them directly from the P1.any file. This is done by the following
changes:
AnyKinEqInterPolDriver P1Driver = {
Type = Bspline;
BsplineOrder = 4;
FileName = "P1.txt";
//AnyKinMeasure &<Insert name0> = <Insert object reference
(or full object definition)>; You can make any number of these objects!
};
Notice that we have selected a Bspline interpolation and that the order is set to 4. A Bspline is a smooth
approximation of the data points, so AnyBody is converting the discrete measured values to a continuous
interpolation function. The advantage of this is that you do not have to perform the analysis precisely at the
sampled times in the MOCAP experiment. You can do more or less time steps exactly as you like.
The final step is to specify what the driver should drive, i.e. point at the linear measure we defined before:
AnyKinEqInterPolDriver P1Driver = {
Type = Bspline;
BsplineOrder = 4;
FileName = "P1.txt";
AnyKinMeasure &Lin = .P1Lin;
};
The model now loads, but it also produces the following warning:
The model may be statically indeterminate. There are 8 reactions and only 6 rigid body degrees of freedom.
The message warns you that there are too many elements in the model that can provide reaction forces. In
general, we MOCAP markers are just registering the positions in space. They do not provide any sort of