2021SC@SDUSC
orb-slam3有一个主要功能就是利用atlas来解决不限数量的子地图融合问题。altas有不限数量的子地图关键帧的词袋数据库,保证了地图场景重识别的效率。
其中多地图的操作算法:新地图生成、在混合地图中重定位和地图融合以及在有差的相机位姿的时候评价跟踪失败的方法。这样可以有效避免在闭环的过程中由于高度不确定的位姿导致的位姿图优化误差过大。
Atlas.cc引用Atlas.h, Viewer.h, GeometricCamera.h, Pinhole.h, KannalaBrandt8.h头文件。
Atlas.h中创建了类Viewer;
类Atlas中public声明中定义了创建新地图方法CreateNewMap();protected声明中set<Maps> mspMaps存放所有的地图。
public声明:
public:
Atlas();
Atlas(int initKFid); // When its initialization the first map is created
~Atlas();
// 创建新地图
void CreateNewMap();
void ChangeMap(Map* pMap);
unsigned long int GetLastInitKFid();
void SetViewer(Viewer* pViewer);
// Method for change components in the current map
void AddKeyFrame(KeyFrame* pKF);
void AddMapPoint(MapPoint* pMP);
void AddCamera(GeometricCamera* pCam);
/* All methods without Map pointer work on current map */
void SetReferenceMapPoints(const std::vector<MapPoi