How lemonci/coko-slam works
Coko-SLAM is a multi-agent Gaussian-splatting SLAM system for reconstructing scenes and estimating camera trajectories from RGB-D datasets. The main workflow loads a configured dataset, runs per-agent tracking and mapping, coordinates submaps and loop/pose-graph optimization, and evaluates and saves results. The README also documents offline visualization. The graph preserves those major stages and the Gaussian representation; some orchestration links rely on the SOURCE INDEX or README because the relevant implementation excerpts are incomplete.
Main entry points: magic_slam.py SLAM coordinator · mapper.py Submap mapper · run_slam.py SLAM runner · agent.py Agent controller
Components 23
Run and data
- SLAM runner
run_slam.py - Run configuration
configs - Dataset loaders
src/entities/datasets.py
Agent estimation
- Agent controller
src/entities/agent.py - Pose tracker
src/entities/tracker.py - Visual odometer
src/entities/visual_odometer.py
Mapping and optimization
- Submap mapper
src/entities/mapper.py - Gaussian model
src/entities/gaussian_model.py - Mapping losses
src/entities/losses.py - Render utilities
src/utils/utils.py - Submap refinement
src/utils/magic_slam_utils.py
Multi-agent coordination
- Loop detection
src/entities/loop_detection/loop_detector.py - Feature extraction
src/entities/loop_detection/feature_extractors.py - Pose-graph adapter
src/entities/pose_graph_adapter.py - Pose graph
src/entities/gtsam_pose_graph.py - SLAM coordinator
src/entities/magic_slam.py
Evaluation and output
- Map evaluation
src/utils/mapping_eval.py - Run logger
src/entities/logger.py - Result I/O
src/utils/io_utils.py - Offline visualization
run_visualization.py - Visualization utilities
src/utils/vis_utils.py - Saved run results
Other components
- Researcher
Connections 26
- Researcher → SLAM runner: starts run
README.md - SLAM runner → Run configuration: loads settings
README.md - SLAM runner → SLAM coordinator: starts SLAM
run_slam.py - SLAM coordinator → Dataset loaders: loads frames
src/entities/magic_slam.py - SLAM coordinator → Agent controller: runs agents
src/entities/magic_slam.py - Agent controller → Pose tracker: uses tracker
src/entities/agent.py - Pose tracker → Visual odometer: uses odometry
src/entities/tracker.py - Agent controller → Submap mapper: uses mapper
src/entities/agent.py - Submap mapper → Gaussian model: updates model
src/entities/mapper.py - Submap mapper → Mapping losses: uses losses
src/entities/mapper.py - Submap mapper → Render utilities: renders model
src/entities/mapper.py - Gaussian model → Render utilities: render inputs
src/utils/utils.py - SLAM coordinator → Loop detection: detects loops
src/entities/magic_slam.py - Loop detection → Feature extraction: extracts features
src/entities/loop_detection/loop_detector.py - SLAM coordinator → Pose-graph adapter: adapts poses
src/entities/magic_slam.py - SLAM coordinator → Pose graph: optimizes poses
src/entities/magic_slam.py - SLAM coordinator → Submap refinement: refines map
src/entities/magic_slam.py - SLAM coordinator → Map evaluation: evaluates map
src/entities/magic_slam.py - SLAM coordinator → Run logger: logs run
src/entities/magic_slam.py - Run logger → Result I/O: writes metrics
src/entities/logger.py - SLAM coordinator → Result I/O: saves outputs
src/entities/magic_slam.py - Map evaluation → Render utilities: renders frames
src/utils/mapping_eval.py - Result I/O → Saved run results: writes artifacts
- Researcher → Offline visualization: views saved run
README.md - Offline visualization → Saved run results: reads results
README.md - Offline visualization → Visualization utilities: uses utilities
run_visualization.py