ORB-SLAM2位姿估计
1.初始化位姿
当跟踪bOK=true时,会依次优先选择“运动模式跟踪”,“关键帧模式跟踪”,若前两者失败,则说明跟踪失败bOK=false,bLOST=true,进入“重定位模式”。
if(mState==OK)
{
// Local Mapping might have changed some MapPoints tracked in last frame
CheckReplacedInLastFrame();
if(mVelocity.empty() || mCurrentFrame.mnId<mnLastRelocFrameId+2)
{
bOK = TrackReferenceKeyFrame();
}