How molaorg/mola works
Project Type and Purpose
• This is an open-source, modular C++ framework for LiDAR odometry, mapping, and localization (MOLA).
High-Level Architecture Overview
A. Entry Points & Orchestration
• CLI “mola_launcher” (loads and wires modules at runtime)
• ROS 2 node bridge (“mola_bridge_ros2”)
B. Core Interfaces & Kernel
• Kernel core library (“mola_kernel”): defines interfaces (DatasetSource, FrontEndBase, BackEndBase, MapServer, VizInterface, FilterBase, etc.) and core data structures (Entity, Factor, WorldModel).
C. Data Sources
• mola_input_* packages (Euroc, KITTI, Rawlog, ROSBag2, Video, Mulran, ParisLuco)
• kitti_metrics_eval (dataset evaluation app)
D. Processing Modules (Plugins)
• Front-end algorithms: lidar odometry, ICP, sensor fusion (“mola_lo_apps”, “mp2p_icp”)
• Back-end optimizers: graph optimization using GTSAM, factor implementations (FactorStereoProjectionPose, SmartFactorIMU, etc.)
• Relocalization modules (“mola_relocalization”)
• Representations (“mola_metric_maps”)
• Pose lists (“mola_pose_list”)
E. Visualization & Output
• mola_viz (local, CLI-based visualization)
• ROS 2 topics & services (messages defined in mola_msgs)
• CLI tools (mola-traj-tools, mola-sm-cli, etc.)
F. Documentation & Devops
• docs/ (Sphinx + Doxygen pipeline)
• .github workflows (build, format checks)
• scripts/ (code formatting, status page generator)
Component Relationships & Data Flow
• Data flows from Data Source modules → Core interfaces → Processing modules → Map server / back-end → Visualizers / ROS 2 topics → end user.
• ROS 2 bridge subscribes and publishes on ROS 2 topics to integrate MOLA pipelines into wider ROS 2 graph.
Architectural Patterns & Design Principles
• Plugin architecture: modules discoverable at runtime through CMake-registered factories.
• Dependency inversion: higher-level modules depend on abstract interfaces in mola_kernel, not on concrete implementations.
• Separation of concerns:
• Data acquisition (mola_input_*)
• Front-end processing (feature extraction, odometry estimation)
• Back-end optimization (graph solvers, factors)
• Management (mola_metric_maps)
• Visualization and messaging (mola_viz, mola_msgs, mola_bridge_ros2)
• ROS 2 integration: pure C++ modules can be used standalone or as nodes in ROS 2.
Detailed Elements to Capture
• mola_launcher as the central orchestrator (shared-lib loader)
• mola_kernel’s interface definitions → implementations in each module
• mola_input_* feeding raw data (point clouds, IMU, images)
• Front-end pipeline modules converting raw data to state estimates
• Back-end modules refining trajectory via optimization (factor graphs)
• Server storing and serving metric maps (grid, voxel, NDT)
• Relocalization module hooking into the back-end for global alignment
• mola_viz and ROS 2 bridge exposing runtime data for visualization
• Message definitions (services and topics) in mola_msgs
• Build system (CMakeLists, colcon_defaults.yaml) and CI pipelines