NDEVR
API Documentation
Atlas

Manages a collection of maps for the ORB-SLAM system. More...

Collaboration diagram for Atlas:
[legend]

Public Member Functions

 Atlas (int initKFid, LogPtr log)
 Constructs an Atlas and creates the first map.
EIGEN_MAKE_ALIGNED_OPERATOR_NEW Atlas (LogPtr log)
 Constructs an Atlas with a logger.
 ~Atlas ()
 Destructor.
GeometricCameraAddCamera (GeometricCamera *pCam)
 Adds a camera model, returning an existing one if equal.
void AddKeyFrame (KeyFrame *pKF)
 Adds a keyframe to the current map.
void AddMapPoint (MapPoint *pMP)
 Adds a map point to the current map.
void ChangeMap (Map *pMap)
 Switches the current active map.
void clearAtlas ()
 Clears the entire Atlas, removing all maps and data.
void clearMap ()
 Clears the current map.
uint04 CountMaps ()
 Returns the number of maps in this Atlas.
MapcreateNewMap ()
 Creates a new map and sets it as the current map.
MapcurrentMapPtr ()
 Returns a pointer to the current active map.
Buffer< GeometricCamera * > GetAllCameras ()
 Returns all registered cameras.
Buffer< KeyFrame * > GetAllKeyFrames ()
 Returns all keyframes in the current map.
Buffer< MapPoint * > GetAllMapPoints ()
 Returns all map points in the current map.
Buffer< Map * > GetAllMaps ()
 Returns all maps managed by this Atlas.
KeyFrameDatabaseGetKeyFrameDatabase ()
 Returns the keyframe database.
int GetLastBigChangeIdx ()
 Returns the index of the last big change in the current map.
uint04 GetLastInitKFid ()
 Returns the last initial keyframe ID across all maps.
ORBVocabularyGetORBVocabulary ()
 Returns the ORB vocabulary.
Buffer< MapPoint * > GetReferenceMapPoints ()
 Returns the reference map points in the current map.
void InformNewBigChange ()
 Signals that a big change (e.g.
bool isImuInitialized ()
 Checks whether the IMU has been initialized for the current map.
bool isInertial ()
 Checks whether the current map uses an inertial sensor.
uint04 KeyFramesInMap ()
 Returns the number of keyframes in the current map.
uint04 MapPointsInMap ()
 Returns the number of map points in the current map.
void RemoveBadMaps ()
 Removes all maps that have been marked as bad.
void SetImuInitialized ()
 Marks the IMU as initialized for the current map.
void SetInertialSensor (bool is_inertial)
 Sets whether the current map uses an inertial sensor.
void SetKeyFrameDababase (KeyFrameDatabase *pKFDB)
 Sets the keyframe database used for place recognition.
void SetMapBad (Map *pMap)
 Marks a map as bad and moves it to the bad maps list.
void SetORBVocabulary (ORBVocabulary *pORBVoc)
 Sets the ORB vocabulary for feature matching.
void SetReferenceMapPoints (const Buffer< MapPoint * > &vpMPs)
 Sets the reference map points for the current map.

Protected Attributes

LogPtr m_log = nullptr
 Logger instance.
std::mutex mMutexAtlas
 Mutex protecting Atlas state.
uint04 mnLastInitKFidMap = 0U
 Last initial keyframe ID across maps.
MapmpCurrentMap = nullptr
 Currently active map.
KeyFrameDatabasempKeyFrameDB = nullptr
 Keyframe database for place recognition.
ORBVocabularympORBVocabulary = nullptr
 ORB vocabulary for feature matching.
Buffer< Map * > mspBadMaps
 Maps marked as bad.
Buffer< Map * > mspMaps
 All active maps.
Buffer< GeometricCamera * > mvpCameras
 Registered camera models.

Detailed Description

Manages a collection of maps for the ORB-SLAM system.

The Atlas holds multiple maps, tracks the current active map, and provides methods for adding/removing keyframes, map points, and cameras across maps.

Definition at line 28 of file Atlas.h.

Constructor & Destructor Documentation

◆ Atlas() [1/2]

EIGEN_MAKE_ALIGNED_OPERATOR_NEW Atlas::Atlas ( LogPtr log)

Constructs an Atlas with a logger.

Parameters
[in]logLogger for diagnostic output.

◆ Atlas() [2/2]

Atlas::Atlas ( int initKFid,
LogPtr log )

Constructs an Atlas and creates the first map.

Parameters
[in]initKFidInitial keyframe ID for the first map.
[in]logLogger for diagnostic output.

Member Function Documentation

◆ AddCamera()

GeometricCamera * Atlas::AddCamera ( GeometricCamera * pCam)

Adds a camera model, returning an existing one if equal.

Parameters
[in]pCamPointer to the camera to add.
Returns
Pointer to the added or existing equivalent camera.

◆ AddKeyFrame()

void Atlas::AddKeyFrame ( KeyFrame * pKF)

Adds a keyframe to the current map.

Parameters
[in]pKFPointer to the keyframe to add.

◆ AddMapPoint()

void Atlas::AddMapPoint ( MapPoint * pMP)

Adds a map point to the current map.

Parameters
[in]pMPPointer to the map point to add.

◆ ChangeMap()

void Atlas::ChangeMap ( Map * pMap)

Switches the current active map.

Parameters
[in]pMapPointer to the map to activate.

◆ CountMaps()

uint04 Atlas::CountMaps ( )

Returns the number of maps in this Atlas.

Returns
Map count.

◆ createNewMap()

Map * Atlas::createNewMap ( )

Creates a new map and sets it as the current map.

Returns
Pointer to the newly created map.

◆ currentMapPtr()

Map * Atlas::currentMapPtr ( )

Returns a pointer to the current active map.

Returns
Pointer to the current map.

◆ GetAllCameras()

Buffer< GeometricCamera * > Atlas::GetAllCameras ( )

Returns all registered cameras.

Returns
Buffer of camera pointers.

◆ GetAllKeyFrames()

Buffer< KeyFrame * > Atlas::GetAllKeyFrames ( )

Returns all keyframes in the current map.

Returns
Buffer of keyframe pointers.

◆ GetAllMapPoints()

Buffer< MapPoint * > Atlas::GetAllMapPoints ( )

Returns all map points in the current map.

Returns
Buffer of map point pointers.

◆ GetAllMaps()

Buffer< Map * > Atlas::GetAllMaps ( )

Returns all maps managed by this Atlas.

Returns
Buffer of map pointers.

◆ GetKeyFrameDatabase()

KeyFrameDatabase * Atlas::GetKeyFrameDatabase ( )

Returns the keyframe database.

Returns
Pointer to the keyframe database.

◆ GetLastBigChangeIdx()

int Atlas::GetLastBigChangeIdx ( )

Returns the index of the last big change in the current map.

Returns
The big change index.

◆ GetLastInitKFid()

uint04 Atlas::GetLastInitKFid ( )

Returns the last initial keyframe ID across all maps.

Returns
The last initial keyframe ID.

◆ GetORBVocabulary()

ORBVocabulary * Atlas::GetORBVocabulary ( )

Returns the ORB vocabulary.

Returns
Pointer to the ORB vocabulary.

◆ GetReferenceMapPoints()

Buffer< MapPoint * > Atlas::GetReferenceMapPoints ( )

Returns the reference map points in the current map.

Returns
Buffer of reference map point pointers.

◆ InformNewBigChange()

void Atlas::InformNewBigChange ( )

Signals that a big change (e.g.

loop closure) has occurred in the current map.

◆ isImuInitialized()

bool Atlas::isImuInitialized ( )

Checks whether the IMU has been initialized for the current map.

Returns
True if the IMU is initialized.

◆ isInertial()

bool Atlas::isInertial ( )

Checks whether the current map uses an inertial sensor.

Returns
True if the current map is inertial.

◆ KeyFramesInMap()

uint04 Atlas::KeyFramesInMap ( )

Returns the number of keyframes in the current map.

Returns
Keyframe count.

◆ MapPointsInMap()

uint04 Atlas::MapPointsInMap ( )

Returns the number of map points in the current map.

Returns
Map point count.

◆ SetInertialSensor()

void Atlas::SetInertialSensor ( bool is_inertial)

Sets whether the current map uses an inertial sensor.

Parameters
[in]is_inertialTrue to enable inertial mode.

◆ SetKeyFrameDababase()

void Atlas::SetKeyFrameDababase ( KeyFrameDatabase * pKFDB)

Sets the keyframe database used for place recognition.

Parameters
[in]pKFDBPointer to the keyframe database.

◆ SetMapBad()

void Atlas::SetMapBad ( Map * pMap)

Marks a map as bad and moves it to the bad maps list.

Parameters
[in]pMapPointer to the map to mark as bad.

◆ SetORBVocabulary()

void Atlas::SetORBVocabulary ( ORBVocabulary * pORBVoc)

Sets the ORB vocabulary for feature matching.

Parameters
[in]pORBVocPointer to the ORB vocabulary.

◆ SetReferenceMapPoints()

void Atlas::SetReferenceMapPoints ( const Buffer< MapPoint * > & vpMPs)

Sets the reference map points for the current map.

Parameters
[in]vpMPsBuffer of reference map point pointers.

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