ORBSLAM3-优化函数整理
函数名称:
void Optimizer::InertialOptimization(Map* pMap, Eigen::Matrix3d& Rwg, double& scale, Eigen::Vector3d& bg,Eigen::Vector3d& ba, Eigen::MatrixXd& covInertial, bool bFixedVel,bool bGauss, float priorG, float priorA)
调用阶段:
LocalMapping::InitializeIMU(float priorG, float priorA, bool bFIBA)
涉及顶点:
- VertexPose
- VertexVelocity
- VertexGyroBias
- VertexAccBias
- VertexGDir(重力方向)
- VertexScale
涉及的边:
-
EdgePriorAcc
所用顶点(1个):VertexAccBias
-
EdgePriorGyro
所用顶点(1个):VertexGyroBias
-
EdgeInertialGS(imu 和 重力及scale 之间的联系)
所用顶点(8个):VertexPose(preKF)、VertexVelocity(preKF)、VertexPose、VertexVelocity、VertexGyroBias、VertexAccBias、VertexGDir、VertexScale
函数名称:
void Optimizer::FullInertialBA(Map* pMap, int its, const bool bFixLocal, const unsigned long nLoopId,bool* pbStopFlag, bool bInit, float priorG, float priorA, Eigen::VectorXd* vSingVal,bool* bHess)
调用阶段:
涉及顶点:
- VertexPose
- VertexVelocity(imu模式下)
- VertexGyroBias
- VertexAccBias
- g2o::VertexSBAPointXYZ(三维点)
涉及的边:
-
EdgeInertial
所用顶点(6个):VertexPose(preKF)、VertexVelocity(preKF)、VertexGyroBias(preKF)、VertexAccBias(preKF)、VertexPose、VertexVelocity
-
EdgeGyroRW
所用顶点(2个):VertexGyroBias(preKF)、VertexGyroBias(curKF)
-
EdgeAccRW
所用顶点(2个):VertexAccBias(preKF)、VertexAccBias(curKF)
-
EdgePriorAcc
所用顶点(1个):VertexAccBias
-
EdgePriorGyro
所用顶点(1个):VertexGyroBias
-
EdgeMono
所用顶点(2个):g2o::VertexSBAPointXYZ、VertexPose
函数名称:
void Optimizer::LocalInertialBA(KeyFrame* pKF, bool* pbStopFlag, Map* pMap, int& num_fixedKF, int& num_OptKF,int& num_MPs, int& num_edges, bool bLarge, bool bRecInit)
调用阶段:
涉及的顶点:
- VertexPose
- VertexVelocity(imu模式下)
- VertexGyroBias
- VertexAccBias
- g2o::VertexSBAPointXYZ(三维点)
涉及的边:
-
EdgeInertial(同上一函数)
-
EdgeGyroRW(同上一函数)
-
EdgeAccRW(同上一函数)
-
EdgeMono
所用顶点(2个):g2o::VertexSBAPointXYZ、VertexPose
函数名称:
int Optimizer::PoseInertialOptimizationLastFrame(Frame* pFrame, bool bRecInit)
调用阶段:
涉及的顶点:
- VertexPose
- VertexVelocity
- VertexGyroBias
- VertexAccBias
涉及的边:
-
EdgeMonoOnlyPose
所用顶点(1个):VertexPose
-
EdgeInertial(同上)
-
EdgeGyroRW(同上)
-
EdgeAccRW(同上)
-
EdgePriorPoseImu
所用顶点(4个):VertexPose、VertexVelocity、VertexGyroBias、VertexAccBias
函数名称:
int Optimizer::PoseInertialOptimizationLastKeyFrame(Frame* pFrame, bool bRecInit)
调用阶段:
涉及的顶点:
- VertexPose
- VertexVelocity
- VertexGyroBias
- VertexAccBias
涉及的边:
-
EdgeMonoOnlyPose(同上)
-
EdgeInertial(同上)
-
EdgeGyroRW(同上)
-
EdgeAccRW(同上)