Overview
TheSystem class is the main entry point for ORB-SLAM3. It initializes and manages all SLAM components including tracking, local mapping, loop closing, and visualization threads.
Constructor
Parameters
strVocFile: Path to the ORB vocabulary filestrSettingsFile: Path to the settings configuration filesensor: Sensor type (see eSensor enum)bUseViewer: Enable/disable the visualization viewer (default: true)initFr: Initial frame ID (default: 0)strSequence: Optional sequence name for dataset identification
Example
Enumerations
eSensor
Defines the input sensor type:FileType
Defines the file output format:Tracking Methods
TrackMonocular
im: Input image (RGB CV_8UC3 or grayscale CV_8U). RGB is converted to grayscaletimestamp: Frame timestamp in secondsvImuMeas: Optional vector of IMU measurementsfilename: Optional filename for debugging
TrackStereo
imLeft: Left rectified image (RGB CV_8UC3 or grayscale CV_8U)imRight: Right rectified image (RGB CV_8UC3 or grayscale CV_8U)timestamp: Frame timestamp in secondsvImuMeas: Optional vector of IMU measurementsfilename: Optional filename for debugging
TrackRGBD
im: RGB image (CV_8UC3) or grayscale (CV_8U)depthmap: Depth map (CV_32F float format)timestamp: Frame timestamp in secondsvImuMeas: Optional vector of IMU measurementsfilename: Optional filename for debugging
Mode Control
ActivateLocalizationMode
DeactivateLocalizationMode
State Management
Reset
ResetActiveMap
Shutdown
isShutDown
Map Change Detection
MapChanged
Trajectory Export
SaveTrajectoryTUM
Shutdown() first. Format: http://vision.in.tum.de/data/datasets/rgbd-dataset
SaveKeyFrameTrajectoryTUM
SaveTrajectoryEuRoC
SaveKeyFrameTrajectoryEuRoC
SaveTrajectoryKITTI
Shutdown() first. Format: http://www.cvlibs.net/datasets/kitti/eval_odometry.php
Frame Information
GetTrackingState
GetTrackedMapPoints
GetTrackedKeyPointsUn
Debugging Methods
GetTimeFromIMUInit
isLost
isFinished
ChangeDataset
GetImageScale
SaveDebugData
Usage Example
Thread Safety
The System class manages multiple threads internally:- Tracking: Runs in the main thread
- Local Mapping: Runs in a separate thread (mptLocalMapping)
- Loop Closing: Runs in a separate thread (mptLoopClosing)
- Viewer: Runs in a separate thread (mptViewer)
Related Classes
- Tracking - Camera tracking and pose estimation
- LocalMapping - Local map management
- LoopClosing - Loop detection and correction