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... | |
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.
|
inline |
Default constructor.
options | Options for the initializer |
Definition at line 88 of file FeatureInitializer.h.
|
protected |
Helper function for the gauss newton method that computes error of the given estimate.
clonesCAM | Map between camera ID to map of timestamp to camera pose estimate |
feat | Pointer to the feature |
alpha | x/z in anchor |
beta | y/z in anchor |
rho | 1/z inverse depth |
Definition at line 377 of file FeatureInitializer.cpp.
|
inline |
Gets the current configuration of the feature initializer.
Definition at line 128 of file FeatureInitializer.h.
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.
feat | Pointer to feature |
clonesCAM | Map between camera ID to map of timestamp to camera pose estimate (rotation from global to camera, position of camera in global frame) |
Definition at line 197 of file FeatureInitializer.cpp.
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.
feat | Pointer to feature |
clonesCAM | Map between camera ID to map of timestamp to camera pose estimate (rotation from global to camera, position of camera in global frame) |
Definition at line 30 of file FeatureInitializer.cpp.
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.
feat | Pointer to feature |
clonesCAM | Map between camera ID to map of timestamp to camera pose estimate (rotation from global to camera, position of camera in global frame) |
Definition at line 114 of file FeatureInitializer.cpp.
|
protected |
Contains options for the initializer process.
Definition at line 132 of file FeatureInitializer.h.