MSCEqF 1.0
Multi State Constraint Equivariant Filter for visual inertial navigation
Loading...
Searching...
No Matches
msceqf::TrackManager Class Reference

This class manages the multiple tracks of feature traked in time. More...

#include <track_manager.hpp>

Public Member Functions

 TrackManager (const TrackManagerOptions &opts, const Vector4 &intrinsics)
 TrackManager constructor.
 
void processCamera (Camera &cam)
 Process a single camera measurement. Forward camera measurement to tracker, and update tracks.
 
void processFeatures (const TriangulatedFeatures &features)
 Process a single features measurement. update tracks.
 
const Tracks & tracks () const
 Get all the tracks.
 
void tracksIds (const fp &timestamp, std::unordered_set< uint > &active_ids, std::unordered_set< uint > &lost_ids) const
 Get all the ids corresponding to active and lost tracks at a given timestamp. Active tracks are defined as tracks that have are actively tracked at a given timestamp. Lost tracks are defined as tracks that are not being tracked at a given timestamp and thus they do not have coordinates at a given timestamp.
 
void activeTracksIds (const fp &timestamp, std::unordered_set< uint > &active_ids) const
 Get all the ids corresponding to active tracks at a given timestamp. Active tracks are defined as tracks that have are actively tracked at a given timestamp.
 
void lostTracksIds (const fp &timestamp, std::unordered_set< uint > &lost_ids) const
 Get all the ids corresponding to lost tracks at a given timestamp. Lost tracks are defined as tracks that are not being tracked at a given timestamp and thus they do not have coordinates at a given timestamp.
 
void removeTracksId (const std::unordered_set< uint > &ids)
 Remove all the tracks corresponding to given ids.
 
void removeTracksTail (const fp &timestamp, const bool &remove_equal=true)
 Remove the tail of tracks. This method remove from each track all the coordinates as well as the timestamps that are older (or equal) to the given timestamp.
 
void clear ()
 Clear all the tracks.
 
const PinholeCameraUniquePtr & cam () const
 Get the camera pointer.
 

Detailed Description

This class manages the multiple tracks of feature traked in time.

Constructor & Destructor Documentation

◆ TrackManager()

msceqf::TrackManager::TrackManager ( const TrackManagerOptions & opts,
const Vector4 & intrinsics )

TrackManager constructor.

Parameters
optsTracker options
intrinsicsCamera intrinsics as R4 vector (fx, fy, cx, cy)

Member Function Documentation

◆ activeTracksIds()

void msceqf::TrackManager::activeTracksIds ( const fp & timestamp,
std::unordered_set< uint > & active_ids ) const

Get all the ids corresponding to active tracks at a given timestamp. Active tracks are defined as tracks that have are actively tracked at a given timestamp.

Parameters
timestampTimestamp
active_idsActive tracks ids
Here is the caller graph for this function:

◆ cam()

const PinholeCameraUniquePtr & msceqf::TrackManager::cam ( ) const

Get the camera pointer.

Returns
Pointer to the camera object
Here is the caller graph for this function:

◆ lostTracksIds()

void msceqf::TrackManager::lostTracksIds ( const fp & timestamp,
std::unordered_set< uint > & lost_ids ) const

Get all the ids corresponding to lost tracks at a given timestamp. Lost tracks are defined as tracks that are not being tracked at a given timestamp and thus they do not have coordinates at a given timestamp.

Parameters
timestampTimestamp
lost_idsLost tracks ids

◆ processCamera()

void msceqf::TrackManager::processCamera ( Camera & cam)

Process a single camera measurement. Forward camera measurement to tracker, and update tracks.

Parameters
camCamera measurement

◆ processFeatures()

void msceqf::TrackManager::processFeatures ( const TriangulatedFeatures & features)

Process a single features measurement. update tracks.

Parameters
featuresFeatures measurement

◆ removeTracksId()

void msceqf::TrackManager::removeTracksId ( const std::unordered_set< uint > & ids)

Remove all the tracks corresponding to given ids.

Parameters
idsIds of tracks to be removed
Note
The use of unordered_set as a hash set improves performance compared to a std::vector<uint>

◆ removeTracksTail()

void msceqf::TrackManager::removeTracksTail ( const fp & timestamp,
const bool & remove_equal = true )

Remove the tail of tracks. This method remove from each track all the coordinates as well as the timestamps that are older (or equal) to the given timestamp.

Parameters
timestampTimestamp
remove_equalFlag to indicate whether to include in the removal also the coordinates and timestamps at the given timestamp

◆ tracks()

const Tracks & msceqf::TrackManager::tracks ( ) const

Get all the tracks.

Returns
Tracks
Here is the caller graph for this function:

◆ tracksIds()

void msceqf::TrackManager::tracksIds ( const fp & timestamp,
std::unordered_set< uint > & active_ids,
std::unordered_set< uint > & lost_ids ) const

Get all the ids corresponding to active and lost tracks at a given timestamp. Active tracks are defined as tracks that have are actively tracked at a given timestamp. Lost tracks are defined as tracks that are not being tracked at a given timestamp and thus they do not have coordinates at a given timestamp.

Parameters
timestampTimestamp
active_idsActive tracks ids
lost_idsLost tracks ids

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