How xiaobainixi/orb-slam2_rgbd_dense_map works
Main Components
• Camera/Sensor Input: Represent the different sensor modalities given by the Examples directories for Monocular, Stereo, and RGB-D configurations. These are the entry points for image and range data.
• Tracking Module: The tracking component (files like Tracking.cc, Tracking.h) is responsible for frame-to-frame motion estimation and initial pose estimation.
• Local Mapping: Shown in LocalMapping.cc/h, Map.cc/h, and related classes (KeyFrame, MapPoint) which manage the creation and maintenance of the reconstructed scene.
• Loop Closing: Represented by LoopClosing.cc/h, this module detects loop closures and triggers global optimization. Note that the modification includes a viewer thread integrated with loop closing.
• Viewer / Point Cloud Mapping: The new viewer that uses PCL (indicated by pointcloudmapping.cc and the included viewer thread) visualizes the SLAM results and point clouds.
• Vocabulary and KeyFrame Database: Handle place recognition and relocalization using external data from Vocabulary (downloaded separately as per the README) and implementations provided in key files like ORBVocabulary.h.
Interactions and Data Flow
• Sensor Input → Tracking: Illustrate how sensor data flows into the tracking component.
• Tracking ↔ Local Mapping: Show bidirectional communication where tracking provides new frames and key frames to be inserted into the map, while the map (and local mapping thread) provides updated pose and map information back to tracking.
• Local Mapping → Loop Closing: Indicate that the map updates are monitored by the loop closing module to detect large-scale inconsistencies.
• Viewer Thread: Connect the viewer to both the local mapping and loop closing modules for real-time visualization of the evolving map and point cloud data.
Key Architectural Patterns and Design Principles
• Module Separation: Emphasize that each major component (tracking, local mapping, loop closing, viewer) is encapsulated, allowing for clear separation of concerns.
• External Dependency Integration: Make clear the role of third-party libraries (DBoW2 and g2o) and how they interact with internal components.
• Real-time Visualization: The integration of a PCL-based viewer thread is a significant addition; indicate it as a parallel component that receives feedback from mapping and loop-closing.