How snt-arg/semantic_orb_slam3_ros works
Project Type and Purpose
• This is a robotics/SLAM system: a ROS wrapper around the C++ ORB-SLAM3 library, extended with semantics (doors, walls, rooms, markers) for map augmentation and hierarchical visualization.
• It uses ROS1 (catkin), C++ for core SLAM, Python for evaluation scripts, and config files for multiple sensor/dataset modes.
File-Structure Analysis
• Top-level artifacts:
• CMakeLists.txt, package.xml – build and ROS metadata
• Dockerfile – containerized ROS Noetic + RealSense
• Dependencies.md – lists third-party libraries
• LICENSE, README.md
• Directories:
• orb_slam3/… – upstream ORB-SLAM3 core sources, third-party libs (DBoW2, g2o, Sophus, nlohmann/json) and vocabulary file
• src/… – ROS node wrappers (ros_mono, ros_rgbd, ros_stereo, ros_*_inertial), AR viewer code, common utilities
• /… – headers for shared utilities
• config/… – YAML camera calibration and dataset parameters, RViz scenes
• launch/… – ROS launch files per sensor/dataset mode
• evaluation/… – Python scripts to generate pose files and compute ATE
• doc/… – sample launch snippets and instructions
• srv/SaveMap.srv – custom ROS service definition
Key Components and Interactions
a. Sensors & Preprocessing
• Physical sensors (RealSense, stereo cameras, IMU)
• External driver nodes:
• realsense2_camera (image, depth, IMU topics)
• aruco_ros marker publisher (/aruco_marker_publisher/markers)
• Output ROS topics: /camera/…, /imu, /aruco_marker_publisher/markers
b. SLAM & Semantic Processing
• orb_slam3_ros node (C++ executable): subscribes to sensor topics, invokes ORB-SLAM3 core (orb_slam3/System.cc, Tracking, LocalMapping, LoopClosing, Viewer)
• Semantic module integrated in Tracking/System: publishes walls, doors, rooms, fiducial markers on topics (/orb_slam3/walls, /orb_slam3/doors, /orb_slam3/rooms, /orb_slam3/fiducial_markers)
• Pangolin viewer (optional) renders real-time map/keyframes
c. Storage & Services
• Persistence via System.SaveAtlasToFile & SaveMap.srv
• Trajectory saving via SaveTrajectory service
d. Visualization & Evaluation
• evaluation scripts subscribe to bag files and stored pose txt for offline ATE scale evaluation
Architectural Patterns & Principles
• Layered architecture: Sensor abstraction, Processing (SLAM + semantics), Interface (ROS topics/services), and Visualization/Evaluation
• Modular separation:
• Core SLAM code isolated under orb_slam3/
• ROS interface code under src/
• Config-driven parameterization (YAML, launch)
• Extensibility: semantic entities plugged in via header/src under Semantic subfolders