General Tracking Framework and Configuration
→
Return to System Configuration
Tracking framework
From version 3.0 on, the Unifeye tracking module/framework was restructured to provide a more flexible and open configuration of different tracking systems. In addition the tracking system configuration has been changed, to separate sensor/tracking specific information from general world properties such as hand eye calibration and offset values. The tracking framework is configured by so called tracking configuration or "Tracking Data" files, which are human readable XML files that can be loaded into the Unifeye SDK by using the function setTrackingData (see the
according section in the
API documentation).
The tracking configuration files contain tracking/sensor specific paremeters as well as general parameters. Information about the configuration for the specifc, supported tracking systems can be found in the
tracking configuration section. This section gives some general background information and general configuration parameters.
General structure
The general layout of a tracking configuration XML file looks like this:
<?xml version="1.0"?>
<TrackingData>
<!--Upper part-->
<Sensors>
<!--Definition of sensors and their sensor coordinate systems -->
<Sensor type="...">
<SensorID>ID_OF_SENSOR</SensorID>
<Parameters>
<!--Sensor specific parameter section-->
</Parameters>
<SensorCOS>
<!--Common sensor coordinate system parameters-->
<SensorCosID>ID_OF_SENSOR_COS</SensorCosID>
<Parameters>
<!--Sensor coordinate system specific parameters (for this sensor)-->
</Parameters>
</SensorCOS>
<!--Further sensor coordinate systems for this sensor-->
...
</Sensor>
<!--Further sensors -->
...
</Sensors>
<!--Lower part-->
<Connections>
<!--Definition of coordinate systems (i.e. linking sensors and sensor coordinate systems
from above to actual coordinate systems -->
<COS>
<!--Common coordinate system parameters-->
<Name>OPTIONAL_NAME_OF_COS</Name>
<Fuser type="...">
<!--Fuser specific parameters-->
<Parameters>
</Parameters>
</Fuser>
<!--We can link 1 to n sensor coordinate systems (even from different sensors
to one coordinate system.-->
<SensorSource trigger="1">
<SensorID>FROM_THE_UPPER_PART</SensorID>
<SensorCosID>FROM_THE_UPPER_PART</SensorCosID>
<!--Optional Hand-Eye calibration values-->
<HandEyeCalibration>
<TranslationOffset>
<x>0.0</x>
<y>0.0</y>
<z>0.0</z>
</TranslationOffset>
<RotationOffset>
<x>0.0</x>
<y>0.0</y>
<z>0.0</z>
<w>1.0</w>
</RotationOffset>
</HandEyeCalibration>
<!--Optional static offset (e.g. if two markers define one COS, their relation
to each other goes in here-->
<COSOffset>
<TranslationOffset>
<x>0.0</x>
<y>0.0</y>
<z>0.0</z>
</TranslationOffset>
<RotationOffset>
<x>0.0</x>
<y>0.0</y>
<z>0.0</z>
<w>1.0</w>
</RotationOffset>
</COSOffset>
</SensorSource>
<!--Further sensor coordinate systems that define this actual coordinate system-->
...
</COS>
<!--Further coordinate systems-->
...
</Connections>
</TrackingData>
The tracking configuration XML files have two major sections:
- The upper section (within the
<Sensors> tag) configures sensor/tracking specific parameters (every tracking has specific parameters. Details about those specific parameters can are available in the tracking configuration section).
In general every sensor can track one or several so called sensor coordinate systems ( SensorCOS) which are specific for the sensor. E.g. a mechanical tracking arm like the FARO arm can only track one coordinate system (the arm itself), whereas a marker tracking sensor can track as many (distinct) markers (and thus sensor coordinate systems) at the same time as you configure. In addition to that you are not limited to only one tracking system but can configure to use several tracking systems/sensors at the same time and e.g. "fuse" the results.
- The lower part of the tracking configuration file (i.e. the part within the
<Connections> section of the XML file) configures general parameters and connects the outputs from one or several tracking systems/sensors to actual coordinate systems ( COS) which are used for binding 3D model data to it. Throughout the Unifeye SDK API, most of the time you will deal with those coordinate systems (COSes), for example for binding 3D models to it, for getting tracking values etc. Those coordinate systems are simply addressed by the numerical number corresponding to the appearance within the XML file. So the first coordinate system has the COS ID 1, the second the COS ID 2 etc.
Common parameters for all sensor coordinate systems
As mentioned above every tracking system/sensor can have specific parameters. But there are also parameters within the
<Sensors/Sensor/SensorCOS> section that are available for all sensor coordinate systems (although they might not make sense for all tracking systems):
Tracking offsets/ parameters
The properties which are general for all tracking systems/coordinate systems (see the
<Connections> part in the tracking configuration file) are as follows:
- an optional Hand Eye Calibration offset which is applied before the actual tracking information from a sensor coordinate system is used (i.e. "multiplied from the left"),
- an optional coordinate system offset which is applied after the tracking information from a sensor coordinate system is used (i.e. "multiplied from the right"),
- a Fuser type (see the Fuser section below)
- an optional name for the coordinate system. Please note (as mentionend above) that you will be using the numerical COS ID (which is the numerical number corresponding to the appearance within the XML file) usually throughout the Unifeye SDK API when dealing with coordinate systems.
The overall tracking chain is thus: "Hand Eye Calibration offset" x "Tracking pose from sensor coordinate system" x "coordinate system offset". The different offsets are given as translation in 3D and a rotation quaternion.
Fusers
The Fuser allows to combine the tracking information of several
SensorCOSes to one
COS or to perform specific actions on the result of a
SensorCOS. Depending on the choice of fuser the combination is done based on different rules and with different outcomes. In a standard scenario you will usually have one
SensorCOS per
COS like one Marker (one marker
SensorCOS) defining one coordinate system (
COS). However, as just mentioned, you can combine several
SensorCOSes (even from different sensors/tracking systems) to set up one coordinate systems. In such cases, usually the offsets between the SensorCOSes are fixed and their relations measured beforehand and put as coordinate system offset into the tracking configuration file (see
Tracking offsets/parameters and
Multiple SensorCOSes building one coordinate system).
The following fusers are currently available:
<Fuser type="DESPFuser">
<Parameters>
<!-- Alpha:
Is a value between 0 and 1 and determines how much influence old values
have for the calculated pose. The bigger Alpha the less influence old values
have on the current pose.
-->
<Alpha>0.2</Alpha>
<!-- Gamma:
Is a value between 0 and 1 and determines how much influence
old values have for the predicted pose. The bigger Gamma the less influence old values
have for the predicted pose.
-->
<Gamma>0.2</Gamma>
<!-- NumberOfPredictions:
Determines the number of predictions.
-->
<NumberOfPredictions>10</NumberOfPredictions>
<!-- FuseTranslation:
If translation values are to be fused.
-->
<FuseTranslation>1</FuseTranslation>
<!-- FuseRotation:
If rotation values are to be fused.
-->
<FuseRotation>1</FuseRotation>
<Constraints>
<!-- Rotation:
You can limit the rotation to not exceed the values given.
Euler angles in DEGREES [-180..+180]
-->
<RotationX min="-1" max="1" />
<RotationY min="-5" max="5" />
<RotationZ min="-25" max="25" />
<!-- Translation:
You can limit the translation to not exceed the values given.
distance in millimeters [-inf..+inf]
-->
<TranslationX min="-300" max="300" />
<TranslationY min="80" max="-80" />
<TranslationZ min="-300" max="-200" />
</Constraints>
</Parameters>
</Fuser>
Default tracking configuration
When the Unifeye SDK system is launched, the default tracking configuration file
<UnifeyeInstallationDirectory>/config/AS_Tracking_Data.xml is loaded. This file configures a marker tracking with three markers and three coordinate systems. The XML content is shown below.
<?xml version="1.0"?>
<TrackingData>
<Sensors>
<Sensor type="MarkerBasedSensorSource">
<SensorID>Markertracking1</SensorID>
<Parameters>
<MarkerTrackingParameters>
<trackingQuality>robust</trackingQuality>
<thresholdOffset>110</thresholdOffset>
<numberOfSearchIterations>1</numberOfSearchIterations>
</MarkerTrackingParameters>
</Parameters>
<SensorCOS>
<SensorCosID>Marker1</SensorCosID>
<Parameters><MarkerParameters>
<Size>140</Size>
<MatrixID>1</MatrixID>
</MarkerParameters>
</Parameters>
</SensorCOS>
<SensorCOS>
<SensorCosID>Marker2</SensorCosID>
<Parameters><MarkerParameters>
<Size>140</Size>
<MatrixID>2</MatrixID>
</MarkerParameters>
</Parameters>
</SensorCOS>
<SensorCOS>
<SensorCosID>Marker3</SensorCosID>
<Parameters><MarkerParameters>
<Size>140</Size>
<MatrixID>3</MatrixID>
</MarkerParameters>
</Parameters>
</SensorCOS>
</Sensor>
</Sensors>
<Connections>
<COS>
<Name>Cos1</Name>
<Fuser type="BestQualityFuser">
<Parameters></Parameters>
</Fuser>
<!-- There are 1-n SensorCoses -->
<SensorSource trigger="1">
<SensorID>Markertracking1</SensorID> <!-- Who tracks... -->
<SensorCosID>Marker1</SensorCosID> <!-- what? -->
<HandEyeCalibration>
<TranslationOffset>
<x>0.0</x>
<y>0.0</y>
<z>0.0</z>
</TranslationOffset>
<RotationOffset>
<x>0.0</x>
<y>0.0</y>
<z>0.0</z>
<w>1.0</w>
</RotationOffset> <!-- e.g. Transform between camera and ART body -->
</HandEyeCalibration>
<COSOffset>
<TranslationOffset>
<x>0.0</x>
<y>0.0</y>
<z>0.0</z>
</TranslationOffset>
<RotationOffset>
<x>0.0</x>
<y>0.0</y>
<z>0.0</z>
<w>1.0</w>
</RotationOffset><!-- offset -->
</COSOffset>
</SensorSource>
</COS>
<COS>
<Name>Cos2</Name>
<Fuser type="BestQualityFuser">
<Parameters></Parameters>
</Fuser>
<SensorSource trigger="1">
<SensorID>Markertracking1</SensorID>
<SensorCosID>Marker2</SensorCosID>
<HandEyeCalibration>
<TranslationOffset>
<x>0.0</x>
<y>0.0</y>
<z>0.0</z>
</TranslationOffset>
<RotationOffset>
<x>0.0</x>
<y>0.0</y>
<z>0.0</z>
<w>1.0</w>
</RotationOffset>
</HandEyeCalibration>
<COSOffset>
<TranslationOffset>
<x>0.0</x>
<y>0.0</y>
<z>0.0</z>
</TranslationOffset>
<RotationOffset>
<x>0.0</x>
<y>0.0</y>
<z>0.0</z>
<w>1.0</w>
</RotationOffset>
</COSOffset>
</SensorSource>
</COS>
<COS>
<Name>Cos3</Name>
<Fuser type="BestQualityFuser">
<Parameters></Parameters>
</Fuser>
<SensorSource trigger="1">
<SensorID>Markertracking1</SensorID>
<SensorCosID>Marker3</SensorCosID>
<HandEyeCalibration>
<TranslationOffset>
<x>0.0</x>
<y>0.0</y>
<z>0.0</z>
</TranslationOffset>
<RotationOffset>
<x>0.0</x>
<y>0.0</y>
<z>0.0</z>
<w>1.0</w>
</RotationOffset>
</HandEyeCalibration>
<COSOffset>
<TranslationOffset>
<x>0.0</x>
<y>0.0</y>
<z>0.0</z>
</TranslationOffset>
<RotationOffset>
<x>0.0</x>
<y>0.0</y>
<z>0.0</z>
<w>1.0</w>
</RotationOffset>
</COSOffset>
</SensorSource>
</COS>
</Connections>
</TrackingData>
Multiple SensorCOSes building one coordinate system
fda
todo: multiple COS setup, DESP fuser, Rel.Cos, invert per sensorCOSID level (up).
→
Return to System Configuration
--
SupportMetaio - 2011-01-21