Qualisys

From FourMs

Jump to: navigation, search

We have 8 Oqus 300 cameras and 1 Oqus 310 camera.


Contents

QTM

General usage guidelines

  • It is not necessary to turn off the cameras, since they will go into sleep mode after an hour of inactivity. Starting up QTM will wake up the cameras.
  • When you move camera positions, don't forget to adjust focus and aperture of each camera.
  • Always calibrate, calibrate, calibrate.
  • For most purposes, it will be sufficient to use QTM for recording, playback, simple editing and analysis.

Installation

If you install QTM on your own computer, remember that you need the latest version of DirectX to be able to play back audio and video together with mocap data.

Calibration

  • Place the "wand kit" in the space to set up the reference coordinate system
  • Start the calibration process in QTM and move the wand in the space to record a calibration file
  • Check that the residual is low
  • DON'T forget that we have "small size" wand kit also. For a measurement using small markers in proximity, use the small calibration kit.

Export Data

When exporting files to be used with the MoCap Toolbox, it is better to export TSV files with the following settings:

  • "TSV header"
  • no "column header"
  • Time/frame columns

WARNING: When you are applying "6DOF Rigid Body", the Mocap Toolbox cannot read 6DOF data exported as a TSV file, you need to export it as a MAT file. To avoid loading two separate file format, it is better to export 3D and 6D data in single MAT file.

  • Check 3D & 6D and export. Ex) fourMs.mat
  • "fourMs.RigidBodies.Positions" contains information of local coordinate origins (Origin of Rigid Body).
  • "fourMs.RigidBodies.RPYs" contains information of rotations (Roll, Pitch, Yaw) of the Rigid Body.
  • "fourMs.RigidBodies.Trajectories" contains information of 3D data of markers.

6DOF Rigid Body measurement

Needs for the 6DOF Rigid Body

  • When the measurement deals with rigid moving objects(geometrical shape does not changes through out the whole measurement, e.g. violin, cymbal)
  • When you want to measure the stable, local movement of markers with respect to the rigid object only, not the global movement. (e.g. finger movement on the moving violin
  • When some markers on the rigid object are expected to be disguised from the camera during measurement.

Conditions for defining the 6DOF Rigid Body

  • Minimum 3 markers (Body dimension should be at least 2D)
  • Symmetric configurations (May cause confusion when the body rotates)
  • Distances and angles between markers should be kept constant during the measurement.

Procedures

  • Defining a 6DOF Rigid Body can be done during the post processing, however, it is good to capture rigid body with separate measurement session.
  • Check "Calculate 6DOF" (file processing option or project option)
  • Select suitable "Bone length tolerance" from the "6DOF Tracking" options, check both conditions (Do not require..., Calculate missing...)
  • Define rigid body 6DOF (Drag markers from the "Labeled trajectories" --> Right Click and Select)
  • If fails, increase Bone length tolerance value
  • Save Body, it will be saved as .xml file.
  • Apply to other measurement. (Load Bodies from options)

Rotation angles in QTM (Qualisys standard)

  • Rotation around the X-axis: "Roll"
  • Rotation around the Y-axis: "Pitch"
  • Rotation around the Z-axis: "Yaw"
  • For more information, see QTM manual

Mathematics for 3D transformation to local 6DOF coordinate (Qualisys Standard)

P_{global}=R \cdot P_{local} + P_{origin}, where R is the rotational matrix,
P_{local}=R^{-1} \cdot (P_{global} - P_{origin})
R = R_{x}(\theta) \cdot R_{y}(\phi) \cdot R_{z}(\psi) \rightarrow R^{-1} = R_{z}(-\psi) \cdot R_{y}(-\phi) \cdot R_{x}(-\theta)
 R_{x}(\theta) = \begin{bmatrix}
1 & 0 &  0 \\
0 & cos{\theta} &  -sin{\theta} \\
0 & sin{\theta} & cos{\theta}
 \end{bmatrix}
 R_{y}(\phi) = \begin{bmatrix}
 cos{\phi} & 0 &  sin{\phi} \\
 0 & 1 &  0 \\
 -sin{\phi} & 0 & cos{\phi}
 \end{bmatrix}
 R_{z}(\psi) = \begin{bmatrix}
 cos{\psi} & -sin{\psi} &  0 \\
 sin{\psi} & cos{\psi} &  0 \\
 0 & 0 & 1
 \end{bmatrix}


Analysis using MATLAB

Using the MoCapToolbox:

Open a TSV or C3D file

mocapdata = mcread;

This will open a dialog where you can choose the file.

Visualize streams

mcplottimeseries(mocapdata, [1 2 3 4 5 6 7], 1:3, 'sec');

Here we plot data from the imported data in mocap, rows 1 to 7, columns 1 to 3 (the XYZ coordinates).


Calculate first derivative (velocity):

d2v=mctimeder(rig, 1);

Calculate second derivative (acceleration:

d2a=mctimeder(rig, 2);

Calculate cumulative distance traveled:

d2dist=mccumdist(rig);

Reading the 6DOF data from .mat file:

load fourMs.mat;
6dof_origins = zeros(1:fourMs.Frames,3);
6dof_RPYs = zeros(1:fourMs.Frames,3);
for ii = 1:fourMs.Frames
     6dof_origins(ii,:) = fourMs.RigidBodies.Positions(1,:,ii);
     6dof_RPYs(ii,:) = fourMs.RigidBodies.RPYs(1,:,ii);
end

Transformation of N-th marker displacement into local coordinate with respect to 6DOF rigid body: (degree, not radian)

local_a = zeros(:,3);
for ii = 1:fourMs.Frames
     invRx = [1 0 0;0 cosd(6dof_RPYs(ii,1)) sind(6dof_RPYs(ii,1));0 -sind(6dof_RPYs(ii,1)) cosd(6dof_RPYs(ii,1))];
     invRy = [cosd(6dof_RPYs(ii,2)) 0 -sind(6dof_RPYs(ii,2));0 1 0; sind(6dof_RPYs(ii,2)) 0 cosd(6dof_RPYs(ii,2))];
     invRz = [cosd(6dof_RPYs(ii,3)) sind(6dof_RPYs(ii,3)) 0;-sind(6dof_RPYs(ii,3)) cosd(6dof_RPYs(ii,3)) 0;0 0 1];
     invR = invRz*invRy*invRx;
     local_a(ii,:) = transpose(invR*transpose(a.data(ii,3*N-2:3*N)-6dof_origins(ii,:)));
end
Personal tools