Specifications

172
// MeasureOrganizer = {0};
Reaction.Type = {On, On, On};
};
The model now uses the new P2.txt file containing all three coordinates to drive the movement. If you
reload the model by pressing F7 and re-run the kinematic analysis, then you should see the same erroneous
pendulum movement as before. So, here comes the trick: We are going to switch the constraint between the
marker and the pendulum to work in the pendulum?s local coordinate system:
AnyKinEq MarkerBodyConstraint = {
AnyKinLinear lin = {
AnyRefFrame &Marker = ..M1;
AnyRefFrame &Body = ..Pendulum.P1;
Ref = 1;
};
MeasureOrganizer = {0};
};
This is a very simple little trick. The line Ref = 1 simply states that the linear measure between the marker
and the pendulum point should be measured in the local coordinate system of the pendulum. Every linear
measure has a Ref specification. If you do not set it explicitly, the system initiates Ref to -1, which means
the global reference frame. After the global reference frame, the reference frames of the measure
components are listed in numerical order starting from zero. Since M1 is the first measure component, its
reference frame would be numbered zero. So Ref = 0 would refer the linear measure to the marker
coordinate system. Pendulum.P1 is the second component and is therefore numbered 1. Please load the
model again (F7) and re-run the kinematic analysis (F5). The movement should now be correct. Please
notice that even though we are driving in the local pendulum coordinate system we did not have to make
any manual conversion of the MOCAP marker data. The MOCAP marker is still driven in the global laboratory
coordinate system. It is only the measure between the marker and the body that has been converted to
local coordinates, and this is handled automatically by AnyBody when you make the switch of reference, Ref
= 1, to the local system.
The extremities of living creatures work much like the pendulum we have studied here in the sense that
they twist and turn in the global reference frame making it tricky to drive the segments in global
coordinates. Therefore it is usually a major advantage to drive models with MOCAP data using local
reference frames.
If you have trouble getting the model to work, then you can download a workable copy here: mocap3.any
.
The topic of the next lesson is noise and accuracy, which is a major pitfall of driving models by MOCAP data.
Noise and accuracy
Nothing man-made is completely perfect and this also goes for experimental data. Motion capture data is
infested with a range of different errors such as soft tissue artifacts, marker placement inaccuracy and
random noise. The data we have used so far is very accurate because it has been manufactured artificially
and stored with 10 decimals in the marker trajectory files we have used. So if we plot the accelerations of
the pendulum marker point, we get the following nice set of curves: