Raycasting Engine & SLAM Simulation

C SDL Graphics Programming Robotics SLAM

Raycasting Engine & SLAM Simulation Sandbox — Personal / Research Project

Coded a full ray-casting 3-D engine from scratch in 4 weeks to generate synthetic worlds for robotics SLAM research.

Show more ↓

1. Problem

The robotics group needed varied, controllable 3-D environments to benchmark SLAM algorithms without expensive real-world data collection. Existing simulators were heavyweight, closed-source, or unsuitable for ray-sensor research.

2. Solution Overview

I built a minimal, real-time raycasting engine (inspired by Wolfenstein 3D) that exposes ground-truth camera poses for algorithm evaluation.

Module Purpose Key Tech & Concepts
Renderer 60 FPS column-wise raycaster with textured walls & sprites DDA traversal · fixed-point arithmetic
Physics Grid-aligned collision & movement 2-D vector maths
SLAM API Step-through playback & pose export (CSV / UDP) C socket API
Level Editor Drag-&-drop map authoring Qt Widgets · JSON

3. Impact

  • Produced 100 + synthetic mazes, accelerating SLAM prototyping by ≈3 × vs. real-lab captures.
  • Adopted in two MSc theses; cited in an internal research note.
  • Personal outcome: deep mastery of linear algebra, trigonometry and low-level optimisation.

4. My Contributions

Designed architecture; implemented all engine subsystems; built tooling (editor & shooter demo); integrated data export into research pipeline; documented maths & API for peers.

5. Key Challenges & Mitigations

Challenge Mitigation & Result
Real-time speed on 2010-era laptops Fixed-point math & cache-friendly DDA → stable 60 FPS
Accurate ground-truth pose export Decoupled render loop from camera state → frame-exact logs
User-friendly map creation Visual editor + JSON interchange → < 5 min scene setup