8#ifndef META_OCEAN_DEVICES_PATTERN_STATIC_PATTERN_TRACKER_6DOF_H
9#define META_OCEAN_DEVICES_PATTERN_STATIC_PATTERN_TRACKER_6DOF_H
22#include <unordered_map>
272 return std::string(
"Static Pattern 6DOF Tracker");
Definition of a class holding the major and minor device type.
Definition devices/Device.h:62
This class implements a helper class to simplify the mapping between internal object ids (of the actu...
Definition Measurement.h:255
This class manages the lifetime of an event subscription for sample events.
Definition Measurement.h:170
virtual SampleRef sample() const
Returns the most recent sample.
ObjectRef< Sample > SampleRef
Definition of an object reference for samples.
Definition Measurement.h:144
std::unordered_set< ObjectId > ObjectIdSet
Definition of an unordered set holding object ids.
Definition Measurement.h:57
uint32_t ObjectId
Definition of an object id.
Definition Measurement.h:47
Measurement(const std::string &name, const DeviceType type)
Creates a new measurement object.
ObjectTracker(const std::string &name, const DeviceType type)
Creates a new object tracker object.
PatternDevice(const std::string &name, const DeviceType type)
Creates a new device by is name.
ObjectMapper< ObjectId > objectIdMapper_
The mapper between internal and external object ids.
Definition StaticPatternTracker6DOF.h:250
std::unordered_map< ObjectId, PatternTransformations > PatternTransformationsMap
Definition of an unsorted map combining object ids with pattern transformations.
Definition StaticPatternTracker6DOF.h:102
SampleEventSubscription worldTrackerSampleEventSubscription_
The subscription object for samples events from the world tracker.
Definition StaticPatternTracker6DOF.h:217
bool isStarted() const override
Returns whether this device is active.
ObjectId registerObject(const std::string &description, const Vector3 &dimension) override
Adds a new tracking pattern.
static std::string deviceNameStaticPatternTracker6DOF()
Returns the name of this tracker.
Definition StaticPatternTracker6DOF.h:270
bool start() override
Starts the device.
static DeviceType deviceTypeStaticPatternTracker6DOF()
Returns the type of this tracker.
Definition StaticPatternTracker6DOF.h:275
void reportNotAlignedPoses(const Timestamp ×tamp)
Reports all pattern poses without aligning the poses with the world tracker.
Lock sampleMapLock_
The look for all transformation maps.
Definition StaticPatternTracker6DOF.h:241
TrackerObjectEventSubscription worldTrackerObjectSubscription_
The subscription object for tracker object events from the world tracker.
Definition StaticPatternTracker6DOF.h:223
void setInput(Media::FrameMediumRefs &&frameMediums) override
Sets the multi-view visual input of this tracker.
void reportAlignedPoses(const Timestamp ×tamp)
Reports all pattern poses by aligning them with the world tracker.
Tracker6DOFRef worldTracker_
The 6-DOF world tracker.
Definition StaticPatternTracker6DOF.h:211
double maximalIntervalForAlignment_
The maximal time interval of transformations that kept stored to determine the aligned transformation...
Definition StaticPatternTracker6DOF.h:247
ObjectIdSet lostPatternTrackerObjects_
The ids of all objects currently not actively tracked.
Definition StaticPatternTracker6DOF.h:232
bool stop() override
Stops the device.
ObjectIdSet worldTrackedPatternObjects_
The ids of all objects currently connected with a world pose.
Definition StaticPatternTracker6DOF.h:226
Tracker6DOFRef patternTracker_
The 6-DOF pattern tracker.
Definition StaticPatternTracker6DOF.h:208
StaticPatternTracker6DOF()
Creates a new Static Pattern feature based 6DOF tracker object.
void onPatternTrackerObject(const Tracker *tracker, const bool found, const ObjectIdSet &objectIds, const Timestamp ×tamp)
Event function for new tracking object event from the pattern tracker.
friend class PatternFactory
Definition StaticPatternTracker6DOF.h:43
void onWorldTrackerSample(const Measurement *measurement, const SampleRef &sample)
Event function for new tracking samples from the world tracker.
size_t maximalNumberForAlignment_
The maximal number of transformations that kept stored to determine the aligned transformation betwee...
Definition StaticPatternTracker6DOF.h:244
~StaticPatternTracker6DOF() override
Destructs an Static Pattern feature based 6DOF tracker object.
SampleEventSubscription patternTrackerSampleEventSubscription_
The subscription object for samples events from the pattern tracker.
Definition StaticPatternTracker6DOF.h:214
std::map< Timestamp, HomogenousMatrix4 > TransformationMap
Definition of a sorted map combining timestamp with transformations.
Definition StaticPatternTracker6DOF.h:50
void onWorldTrackerObject(const Tracker *tracker, const bool found, const ObjectIdSet &objectIds, const Timestamp ×tamp)
Event function for new tracking object event from the world tracker.
ObjectIdSet foundPatternTrackerObjects_
The ids of all objects detected and currently actively tracked.
Definition StaticPatternTracker6DOF.h:229
PatternTransformationsMap patternTrackerTransformationsMap_
Individual transformations (the history of recent poses) of all (pattern) objects.
Definition StaticPatternTracker6DOF.h:235
void onPatternTrackerSample(const Measurement *measurement, const SampleRef &sample)
Event function for new tracking samples from the pattern tracker.
TrackerObjectEventSubscription patternTrackerObjectSubscription_
The subscription object for tracker object events from the pattern tracker.
Definition StaticPatternTracker6DOF.h:220
TransformationMap worldTrackerTransformationMap_
The transformation map (the history of recent poses) of the world tracker.
Definition StaticPatternTracker6DOF.h:238
Tracker6DOF(const std::string &name)
Creates a new 6DOF tracker object.
static DeviceType deviceTypeTracker6DOF()
Definition of this device type.
Definition Tracker6DOF.h:106
This class manages the lifetime of an event subscription for tracker object events.
Definition devices/Tracker.h:143
@ TRACKER_VISUAL
Tracker using a visual input for their measurements.
Definition devices/Tracker.h:64
@ TRACKER_OBJECT
Tracker allowing to register tracking objects at runtime.
Definition devices/Tracker.h:66
Tracker(const std::string &name, const DeviceType type)
Creates a new tracker object.
VisualTracker(const std::string &name, const DeviceType type)
Creates a new visual tracker object.
This class implements a recursive lock object.
Definition Lock.h:31
static constexpr Scalar eps()
This class implements a timestamp.
Definition Timestamp.h:64
SmartDeviceRef< Tracker6DOF > Tracker6DOFRef
Definition of a smart object reference for a 6DOF tracker.
Definition Tracker6DOF.h:30
HomogenousMatrixT4< Scalar > HomogenousMatrix4
Definition of the HomogenousMatrix4 object, depending on the OCEAN_MATH_USE_SINGLE_PRECISION flag eit...
Definition HomogenousMatrix4.h:44
VectorT3< Scalar > Vector3
Definition of a 3D vector.
Definition Vector3.h:29
float Scalar
Definition of a scalar type.
Definition Math.h:129
Namespace of the Devices Pattern library.
Definition devices/pattern/jni/JNI.h:22
Namespace of the Devices library.
Definition AccelerationSensor3DOF.h:24
The namespace covering the entire Ocean framework.
Definition Accessor.h:15