Ocean
Ocean::Devices::SceneTracker6DOF Class Reference

This class implements the base for all 6-DOF scene trackers. More...

Inheritance diagram for Ocean::Devices::SceneTracker6DOF:

Data Structures

class  SceneElement
 This class implements the base class of all scene elements. More...
 
class  SceneElementDepth
 This class implements a scene element holding depth information. More...
 
class  SceneElementFeatureCorrespondences
 This class implements a scene element holding 2D/3D feature correspondences. More...
 
class  SceneElementMeshes
 This class implements a scene element holding 3D meshes. More...
 
class  SceneElementObjectPoints
 Definition of a scene element holding 3D object points. More...
 
class  SceneElementPlanes
 This class implements a scene element holding 3D planes. More...
 
class  SceneElementRoom
 This class implements a scene element holding room objects. More...
 
class  SceneTracker6DOFSample
 Definition of a sample holding one single 6DOF tracker measurement. More...
 

Public Types

typedef std::shared_ptr< SceneElementSharedSceneElement
 Definition of a shared pointer holding a scene element. More...
 
typedef std::vector< SharedSceneElementSharedSceneElements
 Definition of a vector holding scene elements. More...
 
typedef SmartObjectRef< SceneTracker6DOFSample, SampleSceneTracker6DOFSampleRef
 Definition of a smart object reference for 6-DOF scene tracker samples. More...
 
- Public Types inherited from Ocean::Devices::Tracker6DOF
typedef SmartObjectRef< Tracker6DOFSample, SampleTracker6DOFSampleRef
 Definition of a smart object reference for 6DOF tracker samples. More...
 
- Public Types inherited from Ocean::Devices::OrientationTracker3DOF
typedef SmartObjectRef< OrientationTracker3DOFSample, SampleOrientationTracker3DOFSampleRef
 Definition of a smart object reference for 3DOF orientation tracker samples. More...
 
- Public Types inherited from Ocean::Devices::Tracker
enum  TrackerType : uint32_t {
  TRACKER_INVALID = MINOR_INVALID , TRACKER_ORIENTATION_3DOF = (1u << 0u) , TRACKER_POSITION_3DOF = (1u << 1u) , TRACKER_6DOF = TRACKER_ORIENTATION_3DOF | TRACKER_POSITION_3DOF ,
  SCENE_TRACKER_6DOF = (1u << 2u) | TRACKER_6DOF , TRACKER_GPS = (1u << 3u) , TRACKER_MAGNETIC = (1u << 4u) , TRACKER_VISUAL = (1u << 5u) ,
  TRACKER_OBJECT = (1u << 6u)
}
 Definition of different minor device types. More...
 
enum  ReferenceSystem { RS_OBJECT_IN_DEVICE , RS_DEVICE_IN_OBJECT }
 Definition of different tracking reference system. More...
 
typedef float Frequency
 Definition of a tracker frequency in Hz. More...
 
typedef SmartObjectRef< TrackerSample, SampleTrackerSampleRef
 Definition of a smart object reference for tracker samples. More...
 
typedef Callback< void, const Tracker *, const bool, const ObjectIdSet &, const Timestamp & > TrackerObjectCallback
 Definition of a callback function to subscribe for lost and found tracker events. More...
 
- Public Types inherited from Ocean::Devices::Measurement
enum  InterpolationStrategy { IS_INVALID , IS_TIMESTAMP_NEAREST , IS_TIMESTAMP_INTERPOLATE }
 Definition of individual interpolation strategies for samples. More...
 
typedef unsigned int ObjectId
 Definition of an object id. More...
 
typedef std::vector< ObjectIdObjectIds
 Definition of a vector holding object ids. More...
 
typedef std::unordered_set< ObjectIdObjectIdSet
 Definition of an unordered set holding object ids. More...
 
typedef std::unordered_map< std::string, ValueMetadata
 Definition of an unordered map mapping keys to values. More...
 
typedef ObjectRef< SampleSampleRef
 Definition of an object reference for samples. More...
 
typedef Callback< void, const Measurement *, const SampleRef & > SampleCallback
 Definition of a callback function to subscribe for new measurement sample events. More...
 
- Public Types inherited from Ocean::Devices::Device
enum  MajorType : uint32_t { DEVICE_INVALID = 0u , DEVICE_MEASUREMENT = (1u << 0u) , DEVICE_SENSOR = (1u << 1u) | DEVICE_MEASUREMENT , DEVICE_TRACKER = (1u << 2u) | DEVICE_MEASUREMENT }
 Definition of all major device types. More...
 
enum  MinorType : uint32_t { MINOR_INVALID = 0u }
 Base definition of a minor type. More...
 
- Public Types inherited from Ocean::Devices::PositionTracker3DOF
typedef SmartObjectRef< PositionTracker3DOFSample, SamplePositionTracker3DOFSampleRef
 Definition of a smart object reference for 3DOF position tracker samples. More...
 

Public Member Functions

virtual bool exportSceneElements (const std::string &format, std::ostream &outputStream, const std::string &options=std::string()) const
 Exports the determined scene elements. More...
 
- Public Member Functions inherited from Ocean::Devices::Tracker
virtual Frequency frequency () const
 Returns the frequency of this tracker. More...
 
virtual bool isObjectTracked (const ObjectId &objectId) const
 Returns whether a specific object is currently actively tracked by this tracker. More...
 
TrackerObjectEventSubscription subscribeTrackerObjectEvent (TrackerObjectCallback &&callback)
 Subscribes a callback event function for tracker object (found or lost) events. More...
 
virtual HomogenousMatrixD4 reference () const
 Returns the reference coordinate system of this tracker. More...
 
- Public Member Functions inherited from Ocean::Devices::Measurement
size_t sampleCapacity () const
 Returns the capacity of the internal sample container. More...
 
bool setSampleCapacity (const size_t capacity)
 Sets the capacity of the internal sample container. More...
 
virtual SampleRef sample () const
 Returns the most recent sample. More...
 
virtual SampleRef sample (const Timestamp timestamp) const
 Returns the sample with a specific timestamp. More...
 
virtual SampleRef sample (const Timestamp &timestamp, const InterpolationStrategy interpolationStrategy) const
 Returns the sample best matching with a specified timestamp. More...
 
SampleEventSubscription subscribeSampleEvent (SampleCallback &&callback)
 Subscribes a callback event function for new measurement sample events. More...
 
ObjectId objectId (const std::string &description) const
 Returns the object id for an object description. More...
 
Strings objectDescriptions () const
 Returns descriptions of all objects currently available. More...
 
std::string objectDescription (const ObjectId objectId) const
 Returns the description of one object of this measurement. More...
 
- Public Member Functions inherited from Ocean::Devices::Device
const std::string & name () const
 Returns the name of this device. More...
 
virtual const std::string & library () const =0
 Returns the name of the owner library. More...
 
virtual bool isStarted () const
 Returns whether this device is active. More...
 
bool isValid () const
 Returns whether this device is valid. More...
 
bool isExclusive () const
 Returns whether this device can be use exclusively. More...
 
virtual bool start ()
 Starts the device. More...
 
virtual bool pause ()
 Pauses the device. More...
 
virtual bool stop ()
 Stops the device. More...
 
virtual bool setParameter (const std::string &parameter, const Value &value)
 Sets an abstract parameter of this device. More...
 
virtual bool parameter (const std::string &parameter, Value &value)
 Returns an abstract parameter of this device. More...
 
DeviceType type () const
 Returns the major and minor type of this device. More...
 

Static Public Member Functions

static DeviceType deviceTypeSceneTracker6DOF ()
 Definition of this device type. More...
 
- Static Public Member Functions inherited from Ocean::Devices::Tracker6DOF
static DeviceType deviceTypeTracker6DOF ()
 Definition of this device type. More...
 
- Static Public Member Functions inherited from Ocean::Devices::OrientationTracker3DOF
static DeviceType deviceTypeOrientationTracker3DOF ()
 Return the device type of this tracker. More...
 
- Static Public Member Functions inherited from Ocean::Devices::Tracker
static std::string translateTrackerType (const TrackerType trackerType)
 Translates the tracker type to a readable string. More...
 
static TrackerType translateTrackerType (const std::string &trackerType)
 Translates the tracker type from a readable string to a value. More...
 
static constexpr Frequency unknownFrequency ()
 Definition of a constant as unknown frequency. More...
 
- Static Public Member Functions inherited from Ocean::Devices::Measurement
static constexpr ObjectId invalidObjectId ()
 Returns an invalid object id. More...
 
- Static Public Member Functions inherited from Ocean::Devices::Device
static std::string translateMajorType (const MajorType majorType)
 Translates the major devices type to a readable string. More...
 
static MajorType translateMajorType (const std::string &majorType)
 Translates the major devices type from a readable string to a value. More...
 
- Static Public Member Functions inherited from Ocean::Devices::PositionTracker3DOF
static DeviceType deviceTypePositionTracker3DOF ()
 Returns the device type of this tracker. More...
 

Protected Member Functions

 SceneTracker6DOF (const std::string &name)
 Creates a new 6-DOF scene tracker object. More...
 
 ~SceneTracker6DOF () override
 Destructs a 6-DOF tracker object. More...
 
- Protected Member Functions inherited from Ocean::Devices::Tracker6DOF
 Tracker6DOF (const std::string &name)
 Creates a new 6DOF tracker object. More...
 
 ~Tracker6DOF () override
 Destructs a 6DOF tracker object. More...
 
- Protected Member Functions inherited from Ocean::Devices::OrientationTracker3DOF
 OrientationTracker3DOF (const std::string &name)
 Creates a new 3DOF orientation tracker object. More...
 
 ~OrientationTracker3DOF () override
 Destructs a 3DOF orientation tracker. More...
 
- Protected Member Functions inherited from Ocean::Devices::Tracker
 Tracker (const std::string &name, const DeviceType type)
 Creates a new tracker object. More...
 
 ~Tracker () override
 Destructs a tracker object. More...
 
void postFoundTrackerObjects (const ObjectIdSet &objectIds, const Timestamp &timestamp)
 Posts a new found tracker objects event. More...
 
void postLostTrackerObjects (const ObjectIdSet &objectIds, const Timestamp &timestamp)
 Posts a new lost tracker objects event. More...
 
void unsubscribeTrackerObjectEvent (const SubscriptionId subscriptionId)
 Unsubscribes a tracker object event callback function. More...
 
- Protected Member Functions inherited from Ocean::Devices::Measurement
 Measurement (const std::string &name, const DeviceType type)
 Creates a new measurement object. More...
 
 ~Measurement () override
 Destructs a measurement object. More...
 
void postNewSample (const SampleRef &newSample)
 Posts a new measurement sample. More...
 
ObjectId addUniqueObjectId (const std::string &description)
 Creates a unique object id for a new object (e.g., a tracking object like an image, a marker, or a location). More...
 
void unsubscribeSampleEvent (const SubscriptionId subscriptionId)
 Unsubscribes a sample event callback function. More...
 
- Protected Member Functions inherited from Ocean::Devices::Device
 Device (const Device &device)=delete
 Disabled copy constructor. More...
 
 Device (const std::string &name, const DeviceType type)
 Creates a new device by is name. More...
 
virtual ~Device ()
 Destructs a device. More...
 
Deviceoperator= (const Device &device)=delete
 Disabled copy operator. More...
 
- Protected Member Functions inherited from Ocean::Devices::PositionTracker3DOF
 PositionTracker3DOF (const std::string &name)
 Creates a new 3DOF position tracker object. More...
 
 ~PositionTracker3DOF () override
 Destructs a 3DOF position tracker object. More...
 

Additional Inherited Members

- Protected Types inherited from Ocean::Devices::Tracker
typedef std::unordered_map< SubscriptionId, TrackerObjectCallbackTrackerObjectSubscriptionMap
 Definition of a map mapping subscription ids to tracker object event callback functions. More...
 
- Protected Types inherited from Ocean::Devices::Measurement
typedef std::map< Timestamp, SampleRefSampleMap
 Definition of a map holding the most recent samples. More...
 
typedef std::unordered_map< std::string, ObjectIdObjectDescriptionToIdMap
 Definition of an unordered map mapping descriptions to unique object ids. More...
 
typedef std::unordered_map< ObjectId, std::string > ObjectIdToDescriptionMap
 Definition of an unordered map mapping unique object ids to descriptions. More...
 
typedef std::unordered_map< SubscriptionId, SampleCallbackSampleSubscriptionMap
 Definition of a map mapping subscription ids to event sample callback functions. More...
 
- Protected Types inherited from Ocean::Devices::Device
typedef unsigned int SubscriptionId
 Definition of a subscription id for event callbacks. More...
 
- Static Protected Member Functions inherited from Ocean::Devices::Tracker
static ObjectIdSet determineFoundObjects (const ObjectIdSet &previousObjects, const ObjectIdSet &currentObjects)
 Determines the ids which were not tracked in the previous iteration but tracked in the current iteration. More...
 
static ObjectIdSet determineLostObjects (const ObjectIdSet &previousObjects, const ObjectIdSet &currentObjects)
 Determines the ids which were tracked in the previous iteration but not tracked in the current iteration. More...
 
- Static Protected Member Functions inherited from Ocean::Devices::Device
static constexpr SubscriptionId invalidSubscriptionId ()
 Returns an invalid subscription id. More...
 
- Protected Attributes inherited from Ocean::Devices::Tracker
TrackerObjectSubscriptionMap trackerObjectSubscriptionMap_
 Map holding all tracker object event subscriptions. More...
 
SubscriptionId nextTrackerObjectSubscriptionId_ = SubscriptionId(invalidSubscriptionId() + 1u)
 The subscription id of the next event subscription. More...
 
- Protected Attributes inherited from Ocean::Devices::Measurement
Lock samplesLock_
 Sample lock. More...
 
Lock subscriptionLock_
 Subscription lock. More...
 
- Protected Attributes inherited from Ocean::Devices::Device
std::string deviceName
 Name of this device. More...
 
DeviceType deviceType
 Major and minor type of this device. More...
 
bool deviceIsValid
 Flag determining whether this device is valid. More...
 
Lock deviceLock
 Device lock. More...
 

Detailed Description

This class implements the base for all 6-DOF scene trackers.

Scene trackers provides 6-DOF transformations in combination with scene elements like point clouds, meshes, planes, or other content from the environment.

Member Typedef Documentation

◆ SceneTracker6DOFSampleRef

Definition of a smart object reference for 6-DOF scene tracker samples.

◆ SharedSceneElement

Definition of a shared pointer holding a scene element.

◆ SharedSceneElements

Definition of a vector holding scene elements.

Constructor & Destructor Documentation

◆ SceneTracker6DOF()

Ocean::Devices::SceneTracker6DOF::SceneTracker6DOF ( const std::string &  name)
explicitprotected

Creates a new 6-DOF scene tracker object.

Parameters
nameThe name of the 6DOF tracker, must be valid

◆ ~SceneTracker6DOF()

Ocean::Devices::SceneTracker6DOF::~SceneTracker6DOF ( )
overrideprotected

Destructs a 6-DOF tracker object.

Member Function Documentation

◆ deviceTypeSceneTracker6DOF()

SceneTracker6DOF::DeviceType Ocean::Devices::SceneTracker6DOF::deviceTypeSceneTracker6DOF ( )
inlinestatic

Definition of this device type.

◆ exportSceneElements()

virtual bool Ocean::Devices::SceneTracker6DOF::exportSceneElements ( const std::string &  format,
std::ostream &  outputStream,
const std::string &  options = std::string() 
) const
virtual

Exports the determined scene elements.

Parameters
formatThe format of the exported data
outputStreamThe output stream to which the data will be exported
optionsOptional options to configure the export result
Returns
True, if succeeded; False, if not supported

Reimplemented in Ocean::Devices::MapBuilding::OnDeviceMapCreatorTracker6DOF.


The documentation for this class was generated from the following file: