ov_core::Feature class

Sparse feature class used to collect measurements.

Contents

This feature class allows for holding of all tracking information for a given feature. Each feature has a unique ID assigned to it, and should have a set of feature tracks alongside it. See the FeatureDatabase class for details on how we load information into this, and how we delete features.

Public functions

void clean_old_measurements(std::vector<double> valid_times)
Remove measurements that do not occur at passed timestamps.
void clean_older_measurements(double timestamp)
Remove measurements that are older then the specified timestamp.

Public variables

size_t featid
Unique ID of this feature.
bool to_delete
If this feature should be deleted.
std::unordered_map<size_t, std::vector<Eigen::VectorXf>> uvs
UV coordinates that this feature has been seen from (mapped by camera ID)
std::unordered_map<size_t, std::vector<Eigen::VectorXf>> uvs_norm
UV normalized coordinates that this feature has been seen from (mapped by camera ID)
std::unordered_map<size_t, std::vector<double>> timestamps
Timestamps of each UV measurement (mapped by camera ID)
int anchor_cam_id
What camera ID our pose is anchored in!! By default the first measurement is the anchor.
double anchor_clone_timestamp
Timestamp of anchor clone.
Eigen::Vector3d p_FinA
Triangulated position of this feature, in the anchor frame.
Eigen::Vector3d p_FinG
Triangulated position of this feature, in the global frame.

Function documentation

void ov_core::Feature::clean_old_measurements(std::vector<double> valid_times)

Remove measurements that do not occur at passed timestamps.

Parameters
valid_times Vector of timestamps that our measurements must occur at

Given a series of valid timestamps, this will remove all measurements that have not occurred at these times. This would normally be used to ensure that the measurements that we have occur at our clone times.

void ov_core::Feature::clean_older_measurements(double timestamp)

Remove measurements that are older then the specified timestamp.

Parameters
timestamp Timestamps that our measurements must occur after

Given a valid timestamp, this will remove all measurements that have occured earlier then this.