Upload
others
View
3
Download
0
Embed Size (px)
Citation preview
6DOF Webinar
Welcome!
Wednesday, May 26, 2016
Presenters
Erwin Schoonderwaldt
Host
Daniel Thompson
Live chat & questions
Field Applications and Support Team (FAST)
Webinar control panel
Show/hide control panel
Full screen
Audio settings
View and enter questions
Overview of topics
• Introduction to 6DOF tracking [5 min]
• Creating a 6DOF model in QTM (example: head tracking) [40 min]
– Preparation of a rigid body (basics)
– Definition of local coordinate system (LCS)
– Use of virtual markers
• Representation of 6DOF data in QTM [15 min]
– Euler angles
– Rotation matrices
– Export formats and RT streaming
INTRODUCTION TO 6DOF
TRACKING
Part 1
What is 6DOF tracking?
3D tracking
• Tracking of a single marker
• Measurement of position (X, Y, Z)
• 3 degrees of freedom
6DOF tracking
• Tracking of an object (3 or more markers attached to a rigid body)
• Measurement of position and orientation (pose)
• 6 degrees of freedom (3 for position, 3 for rotation)
By Yaw_Axis.svg: Auawise derivative work: Jrvz (Yaw_Axis.svg) [CC BY-SA 3.0 (http://creativecommons.org/licenses/by-sa/3.0)],
via Wikimedia Commons
Why 6DOF tracking?
Additional information
• Pose of an object rather than position of a single marker
• Tracking virtual points where no physical marker can be attached
(e.g. position of eyes when doing head tracking)
Redundancy
• 6DOF tracking more robust in case of occlusions of single markers
– Requires more than 3 markers
We need at least three visible markers in each frame
CREATING A 6DOF MODEL
IN QTM
Part 2
Preparation of a rigid body
Marker configuration: three main principles
• At least 3 markers
4 markers or more recommended for redundancy
• Markers should not be on one line
Markers must span a plane (or a volume)
• Asymmetric placement of markers
Necessary for a unique definition of the orientation
Preparation of a rigid body
Preparation of a rigid body
Multiple rigid bodies
• Use a unique marker configuration for each body
Necessary for correct identification
QTM EXAMPLE
Creating a 6DOF model
Definition of local coordinate system
WHY?
• Meaningful rotation axes
– orientation of ship/aircraft
– Flexion angle of knee
Definition of local coordinate system
Change the definition of the local coordinate system (LCS)
• Tranlation and rotation
Three methods
1. Based on Global Coordinate System
Put rigid body in a known (fixed) orientation relative to GCS
2. Based on specific marker positions
Use (calibration) markers on rigid body
3. Based on another rigid body
Use another rigid body as a reference
QTM EXAMPLE
Define Local Coordinate System
using markers
2. Define LCS using markers
NasalBridge
LeftSideRightSide
Landmarks (calibration markers)
2. Define LCS using markers
NasalBridge
1. Define main axis (X)
Local Coordinate System
User input
LeftSideRightSide
2. Define LCS using markers
NasalBridge
2. Define secondary axis (Z)
Local Coordinate System
User input
LeftSideRightSide
2. Define LCS using markers
NasalBridge
Local Coordinate System
Construction of LCS
LeftSideRightSide
QTM calculates third axis and
recalculates second axis (cross prod)
QTM EXAMPLE
6DOF tracking and virtual markers
Virtual markers in 6DOF model
Summary
• Points in the rigid body definition that do not correspond with tracked
markers
• Virtual markers do not add new information…
• Can be useful as visual aid
– Showing points of interest (where it is difficult or impossible to apply a
marker)
– For example: eyes, joint centers
Tip!
Help to find gaps in 6DOF tracking (visible as gaps in virtual trajectory)
3. LCS based on another rigid body
• Use another rigid body as a reference for position and/or orientation
Define LCS based on another rigid body
• Use another rigid body as a reference for position and/or orientation
QTM EXAMPLE
Define Local Coordinate System
using another rigid body
Saving, loading and editing
Saving and loading rigid bodies
• Save to XML file
• Possible to edit (or generate in an external program and import into
QTM)
REPRESENTATION OF 6DOF
DATA IN QTM
Part 3
Pose of rigid body
• Position of origin of rigid body relative to reference system
– X, Y, Z
• Orientation of rigid body relative to reference system
– Euler angles
– Rotation matrix
• Residual
– Average error (in mm) of measured marker positions compared to fitted
6DOF model (definition)
Euler angles
• Definition
– Three coordinate rotations in sequence can describe any rotation
– 12 valid Euler sequences
– Order of rotations gives different results (representation)
By Lionel Brits - Hand drawn in Inkscape by me, CC BY 3.0, https://commons.wikimedia.org/w/index.php?curid=3362239
Euler angles
Euler angles
• Qualisys standard
1. Roll (about X, between -180 and 180 deg)
2. Pitch (about Y’, between -90 and 90 deg)
3. Yaw (about Z’’, between -180 and 180 deg)
• Cardan or nautical angles (used to describe orientation of a ship or
aircraft)
1. Yaw / Heading (about Z)
2. Pitch / Elevation (about Y’)
3. Roll / Bank (about X’’)
Euler angles
• Problem
– Singularity: large fluctuations of first and third rotation angles when
second angle is at extremes (+/-90 deg)
(cf. gimbal lock)
• Choice of Euler sequence
– Choose best representation based on application (meaningful rotations)
– Avoid singularity
Rotation matrix
• More suitable for computational purposes
– No singularities
Rotation matrix
• Exported by QTM as array of 9 elements per frame (𝑟0, 𝑟1,…, 𝑟8)
𝒙
𝒚
𝒛
𝒙𝑩
𝐲𝐁
𝐳𝐁
𝑩𝟎
Global Coordinate System
𝑅 =
𝑟0 𝑟3 𝑟6𝑟1 𝑟4 𝑟7𝑟2 𝑟5 𝑟8
Rotation matrix
Rotation matrix
• Exported by QTM as array of 9 elements per frame (𝑟0, 𝑟1,…, 𝑟8)
𝒙
𝒚
𝒛
𝒙𝑩
𝐲𝐁
𝐳𝐁
𝑩𝟎
Global Coordinate System
𝑅 =
𝑟0 𝑟3 𝑟6𝑟1 𝑟4 𝑟7𝑟2 𝑟5 𝑟8
Mapping of basis vectors
𝑅 = 𝒙𝑩 𝒚𝑩 𝒛𝑩
Basis vectors of LCS expressed
in global coordinates
Rotation matrix
Rotation matrix
• Exported by QTM as array of 9 elements per frame (𝑟0, 𝑟1,…, 𝑟8)
𝒙
𝒚
𝒛
𝒙𝑩
𝐲𝐁
𝐳𝐁
𝒑𝑩𝟎
Global Coordinate System
𝒑 = 𝑅 ∙ 𝒑′ + 𝑩𝟎
𝑅 =
𝑟0 𝑟3 𝑟6𝑟1 𝑟4 𝑟7𝑟2 𝑟5 𝑟8
Local to global
Transform
Rotation matrix
𝒑′ = 𝑅𝑇 ∙ 𝒑 − 𝑩𝟎
Global to local
File export
• Matlab (data structure)
• TSV (text format, separate file for 6DOF)
RT streaming
• QTM server / RT protocol (TCP/IP, UDP/IP)
– 6DOF data: positions, Euler angles, Rotation matrix, Residual
• Real-time plugins
– Matlab
– Labview
• Open Sound Control (OSC)
• Unity SDK
– Control position and orientation of game objects or cameras
References
• Rotations and Euler angles
– Wikipedia: Euler angles (https://en.wikipedia.org/wiki/Euler_angles)
– James Diebel (2006), Representing Attitude: Euler Angles, Unit Quaternions, and Rotation
Vectors (https://www.astro.rug.nl/software/kapteyn/_downloads/attitude.pdf)
• QTM Manual
– 6DOF Project options:
http://docs.qualisys.com/qtm/QTMhelp.htm#Project_options/6DOF_tracking.htm
– Tracking/processing:
http://docs.qualisys.com/qtm/QTMhelp.htm#Processing_measurement/6DOF_tracking_of_rig
id_bodies.htm
– Appendix F “Rotation angle calculations in QTM”:
http://docs.qualisys.com/qtm/QTMhelp.htm#Rotation_appendix/Appendix_G_Rotation_angle
_calculations_in_QTM.htm
• QTM Real time protocol
– http://qualisys.github.io/Real-Time-Protocol-Documentation/
Questions and Answers (errata)
• First session (Asia)
– Q: Is it possible to show angular velocity of a rigid body?
– A: Yes, you can show this in a plot. The velocity data cannot be
exported though. To plot angular velocity, open a data info window
(ctrl+d), Display 6DOF data, right click on the rigid body, expand "Plot",
expand "Velocity" and select the angle.
Questions and Answers (errata)
• Second session (Europe)
– Q: Is there any way to apply an offset on the rotation of the local coordinate
system?
– A: Yes, there may be several ways to achieve that.
• 1) In the 6DOF tab, select the rigid body and press the Rotate button. Here you can
manually apply rotations about the basis axes. This changes the 6DOF definition.
• 2) Start a measurement (new button or ctrl+n), open the 6DOF tab and press the "Reset
Rotation" button. This will reset the current orientation of all rigid bodies to the
orientation of the global coordinate system. This option also changes the 6DOF
definition.
• 3) You can also change the coordinate system which is used to express the position
and orientation of the rigid body. For this, select the rigid body and press the Coordinate
System button. You can define a custom coordinate system relative to the global
coordinate system, which is then used as a reference for the selected rigid body. When
you are in measurement mode you can use the "Get position" or "Get orientation"
buttons to set the current position/orientation of the rigid body as a reference. This
option does not change the 6DOF definition itself, but it alters the reference.
Questions and Answers (errata)
• Third session (North/South America)
– Q: If you have processed a trial and then use virtual markers to replace
a missing marker and reprocess, does it reprocess the whole trial?
Then you would lose the other processing you have done.
– A: When you reprocess, make sure to checking only the 6DOF option
and keep "Reidentify all body markers" unchecked. Earlier work
including already filled gaps will be retained. You will only loose work if
you reprocess 2D data and Tracking, and reapplying AIM may relabel
markers you have corrected earlier.
– Q: Is it possible to define more than one body in the same
measurament, and define a particular local system for each body
– A: Yes, it is even possible to include the same markers in several rigid
bodies, so you can have several 6DOF representation based on the
same markers.
Questions and Answers (errata)
– Q: Can you define a centroid between two markers?
– A: There is not direct way to do this in the 6DOF interface. However,
you can add a point to the rigid body and define it manually. In that case
you need to calculate the centroid of the markers in local coordinates.
This is easiest if you include the two markers from the beginning in the
6DOF definition. Your centroid is than just the average of the X, Y, Z
coordinates of the two markers.