SaDVIO
Classes | Public Member Functions | Protected Member Functions | List of all members
isae::BundleAdjustmentCERESNumeric Class Reference

An optimizer that uses Numeric Cost function for Bundle Adjustment. More...

#include <BundleAdjustmentCERESNumeric.h>

Inheritance diagram for isae::BundleAdjustmentCERESNumeric:
Inheritance graph
[legend]
Collaboration diagram for isae::BundleAdjustmentCERESNumeric:
Collaboration graph
[legend]

Public Member Functions

 BundleAdjustmentCERESNumeric ()=default
 
 ~BundleAdjustmentCERESNumeric ()=default
 
- Public Member Functions inherited from isae::AOptimizer
 AOptimizer ()
 
void resetMarginalization ()
 
bool landmarkOptimization (std::shared_ptr< Frame > &frame)
 Structure only Bundle Adjustment for a frame. More...
 
bool singleFrameOptimization (std::shared_ptr< Frame > &moving_frame)
 Motion only Bundle Adjustment for a frame. More...
 
bool singleFrameVIOptimization (std::shared_ptr< isae::Frame > &moving_frame)
 Visual-Inertial Motion only Bundle Adjustment for a frame. More...
 
bool localMapBA (std::shared_ptr< isae::LocalMap > &local_map, const size_t fixed_frame_number=0)
 Bundle Adjustment for a local map. More...
 
bool localMapVIOptimization (std::shared_ptr< isae::LocalMap > &local_map, const size_t fixed_frame_number=0)
 Visual-Inertial Bundle Adjustment for a local map. More...
 
double VIInit (std::shared_ptr< isae::LocalMap > &local_map, Eigen::Matrix3d &R_w_i, bool optim_scale=false)
 Visual-Inertial Initialization for a local map. More...
 
virtual bool landmarkOptimizationNoFov (std::shared_ptr< Frame > &f, std::shared_ptr< Frame > &fp, Eigen::Affine3d &T_cam0_cam0p, double info_scale)
 Structure only Bundle Adjustment for a frame with non overlapping fields of view sensors. More...
 
virtual bool marginalize (std::shared_ptr< Frame > &frame0, std::shared_ptr< Frame > &frame1, bool enable_sparsif)
 Marginalization of a frame and its landmarks. More...
 
virtual Eigen::MatrixXd marginalizeRelative (std::shared_ptr< Frame > &frame0, std::shared_ptr< Frame > &frame1)
 Marginalization of all the landmarks linked to two frame and computation of the information matrix of the relative pose. More...
 

Protected Member Functions

uint addResidualsLocalMap (ceres::Problem &problem, ceres::LossFunction *loss_function, ceres::ParameterBlockOrdering *ordering, std::vector< std::shared_ptr< Frame >> &frame_vector, size_t fixed_frame_number, std::shared_ptr< isae::LocalMap > &local_map) override
 Add visual residuals to a CERES problem for a local map. More...
 
uint addSingleFrameResiduals (ceres::Problem &problem, ceres::LossFunction *loss_function, std::shared_ptr< Frame > &frame, typed_vec_landmarks &cloud_to_optimize) override
 Add visual residuals to a CERES problem for a motion only BA. More...
 
uint addLandmarkResiduals (ceres::Problem &problem, ceres::LossFunction *loss_function, typed_vec_landmarks &cloud_to_optimize) override
 Add visual residuals to a CERES problem for structure only BA. More...
 
- Protected Member Functions inherited from isae::AOptimizer
virtual uint addMarginalizationResiduals (ceres::Problem &problem, ceres::LossFunction *loss_function, ceres::ParameterBlockOrdering *ordering)
 Add marginalization residuals to a CERES problem. More...
 
uint addIMUResiduals (ceres::Problem &problem, ceres::LossFunction *loss_function, ceres::ParameterBlockOrdering *ordering, std::vector< std::shared_ptr< Frame >> &frame_vector, size_t fixed_frame_number)
 Add IMU residuals to a CERES problem. More...
 

Additional Inherited Members

- Protected Attributes inherited from isae::AOptimizer
std::unordered_map< std::shared_ptr< Frame >, PoseParametersBlock_map_frame_posepar
 map for pose parameters More...
 
std::unordered_map< std::shared_ptr< Frame >, PointXYZParametersBlock_map_frame_velpar
 map for velocity parameters More...
 
std::unordered_map< std::shared_ptr< Frame >, PointXYZParametersBlock_map_frame_dbapar
 map for accelerometer bias parameters More...
 
std::unordered_map< std::shared_ptr< Frame >, PointXYZParametersBlock_map_frame_dbgpar
 map for gyroscope bias parameters More...
 
std::unordered_map< std::shared_ptr< ALandmark >, PointXYZParametersBlock_map_lmk_ptpar
 map for landmark point parameters More...
 
std::unordered_map< std::shared_ptr< ALandmark >, PoseParametersBlock_map_lmk_posepar
 map for landmark pose parameters More...
 
bool _enable_sparsif = false
 enable sparsification of the marginalization More...
 
std::shared_ptr< Marginalization_marginalization
 marginalization object More...
 
std::shared_ptr< Marginalization_marginalization_last
 marginalization object of the last optimization More...
 

Detailed Description

An optimizer that uses Numeric Cost function for Bundle Adjustment.

Constructor & Destructor Documentation

◆ BundleAdjustmentCERESNumeric()

isae::BundleAdjustmentCERESNumeric::BundleAdjustmentCERESNumeric ( )
default

◆ ~BundleAdjustmentCERESNumeric()

isae::BundleAdjustmentCERESNumeric::~BundleAdjustmentCERESNumeric ( )
default

Member Function Documentation

◆ addLandmarkResiduals()

uint isae::BundleAdjustmentCERESNumeric::addLandmarkResiduals ( ceres::Problem &  problem,
ceres::LossFunction *  loss_function,
typed_vec_landmarks cloud_to_optimize 
)
overrideprotectedvirtual

Add visual residuals to a CERES problem for structure only BA.

Parameters
problemThe CERES problem to which the residuals will be added.
loss_functionThe loss function to be used for the residuals.
cloud_to_optimizeThe landmarks to be optimized.
Returns
The number of residuals added.

Implements isae::AOptimizer.

◆ addResidualsLocalMap()

uint isae::BundleAdjustmentCERESNumeric::addResidualsLocalMap ( ceres::Problem &  problem,
ceres::LossFunction *  loss_function,
ceres::ParameterBlockOrdering *  ordering,
std::vector< std::shared_ptr< Frame >> &  frame_vector,
size_t  fixed_frame_number,
std::shared_ptr< isae::LocalMap > &  local_map 
)
overrideprotectedvirtual

Add visual residuals to a CERES problem for a local map.

Parameters
problemThe CERES problem to which the residuals will be added.
loss_functionThe loss function to be used for the residuals.
orderingThe parameter block ordering for the problem.
frame_vectorThe vector of frames in the local map.
fixed_frame_numberThe number of frames to fix during optimization.
local_mapThe local map to which the residuals will be added.
Returns
The number of residuals added.

Implements isae::AOptimizer.

◆ addSingleFrameResiduals()

uint isae::BundleAdjustmentCERESNumeric::addSingleFrameResiduals ( ceres::Problem &  problem,
ceres::LossFunction *  loss_function,
std::shared_ptr< Frame > &  frame,
typed_vec_landmarks cloud_to_optimize 
)
overrideprotectedvirtual

Add visual residuals to a CERES problem for a motion only BA.

Parameters
problemThe CERES problem to which the residuals will be added.
loss_functionThe loss function to be used for the residuals.
frameThe frame to which the residuals will be added.
cloud_to_optimizeThe landmarks belonging to the frame.
Returns
The number of residuals added.

Implements isae::AOptimizer.


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