Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ov_core::FeatureInitializer Class Reference

Class that triangulates feature. More...

#include <FeatureInitializer.h>

Classes

struct  ClonePose
 Structure which stores pose estimates for use in triangulation. More...
 

Public Member Functions

const FeatureInitializerOptions config ()
 Gets the current configuration of the feature initializer. More...
 
 FeatureInitializer (FeatureInitializerOptions &options)
 Default constructor. More...
 
bool single_gaussnewton (std::shared_ptr< Feature > feat, std::unordered_map< size_t, std::unordered_map< double, ClonePose >> &clonesCAM)
 Uses a nonlinear triangulation to refine initial linear estimate of the feature. More...
 
bool single_triangulation (std::shared_ptr< Feature > feat, std::unordered_map< size_t, std::unordered_map< double, ClonePose >> &clonesCAM)
 Uses a linear triangulation to get initial estimate for the feature. More...
 
bool single_triangulation_1d (std::shared_ptr< Feature > feat, std::unordered_map< size_t, std::unordered_map< double, ClonePose >> &clonesCAM)
 Uses a linear triangulation to get initial estimate for the feature, treating the anchor observation as a true bearing. More...
 

Protected Member Functions

double compute_error (std::unordered_map< size_t, std::unordered_map< double, ClonePose >> &clonesCAM, std::shared_ptr< Feature > feat, double alpha, double beta, double rho)
 Helper function for the gauss newton method that computes error of the given estimate. More...
 

Protected Attributes

FeatureInitializerOptions _options
 Contains options for the initializer process. More...
 

Detailed Description

Class that triangulates feature.

This class has the functions needed to triangulate and then refine a given 3D feature. As in the standard MSCKF, we know the clones of the camera from propagation and past updates. Thus, we just need to triangulate a feature in 3D with the known poses and then refine it. One should first call the single_triangulation() function afterwhich single_gaussnewton() allows for refinement. Please see the Feature Triangulation page for detailed derivations.

Definition at line 42 of file FeatureInitializer.h.

Constructor & Destructor Documentation

◆ FeatureInitializer()

ov_core::FeatureInitializer::FeatureInitializer ( FeatureInitializerOptions options)
inline

Default constructor.

Parameters
optionsOptions for the initializer

Definition at line 88 of file FeatureInitializer.h.

Member Function Documentation

◆ compute_error()

double FeatureInitializer::compute_error ( std::unordered_map< size_t, std::unordered_map< double, ClonePose >> &  clonesCAM,
std::shared_ptr< Feature feat,
double  alpha,
double  beta,
double  rho 
)
protected

Helper function for the gauss newton method that computes error of the given estimate.

Parameters
clonesCAMMap between camera ID to map of timestamp to camera pose estimate
featPointer to the feature
alphax/z in anchor
betay/z in anchor
rho1/z inverse depth

Definition at line 377 of file FeatureInitializer.cpp.

◆ config()

const FeatureInitializerOptions ov_core::FeatureInitializer::config ( )
inline

Gets the current configuration of the feature initializer.

Returns
Const feature initializer config

Definition at line 128 of file FeatureInitializer.h.

◆ single_gaussnewton()

bool FeatureInitializer::single_gaussnewton ( std::shared_ptr< Feature feat,
std::unordered_map< size_t, std::unordered_map< double, ClonePose >> &  clonesCAM 
)

Uses a nonlinear triangulation to refine initial linear estimate of the feature.

Parameters
featPointer to feature
clonesCAMMap between camera ID to map of timestamp to camera pose estimate (rotation from global to camera, position of camera in global frame)
Returns
Returns false if it fails to be optimize (based on the thresholds)

Definition at line 197 of file FeatureInitializer.cpp.

◆ single_triangulation()

bool FeatureInitializer::single_triangulation ( std::shared_ptr< Feature feat,
std::unordered_map< size_t, std::unordered_map< double, ClonePose >> &  clonesCAM 
)

Uses a linear triangulation to get initial estimate for the feature.

The derivations for this method can be found in the 3D Cartesian Triangulation documentation page.

Parameters
featPointer to feature
clonesCAMMap between camera ID to map of timestamp to camera pose estimate (rotation from global to camera, position of camera in global frame)
Returns
Returns false if it fails to triangulate (based on the thresholds)

Definition at line 30 of file FeatureInitializer.cpp.

◆ single_triangulation_1d()

bool FeatureInitializer::single_triangulation_1d ( std::shared_ptr< Feature feat,
std::unordered_map< size_t, std::unordered_map< double, ClonePose >> &  clonesCAM 
)

Uses a linear triangulation to get initial estimate for the feature, treating the anchor observation as a true bearing.

The derivations for this method can be found in the 1D Depth Triangulation documentation page. This function should be used if you want speed, or know your anchor bearing is reasonably accurate.

Parameters
featPointer to feature
clonesCAMMap between camera ID to map of timestamp to camera pose estimate (rotation from global to camera, position of camera in global frame)
Returns
Returns false if it fails to triangulate (based on the thresholds)

Definition at line 114 of file FeatureInitializer.cpp.

Member Data Documentation

◆ _options

FeatureInitializerOptions ov_core::FeatureInitializer::_options
protected

Contains options for the initializer process.

Definition at line 132 of file FeatureInitializer.h.


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


ov_core
Author(s): Patrick Geneva , Kevin Eckenhoff , Guoquan Huang
autogenerated on Mon Jan 22 2024 03:08:17