Skip to content

pacifio/sinclair

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sinclair

Synthetic LiDAR simulation platform for autonomous vehicle research.

Sinclair generates physically-accurate synthetic LiDAR point cloud data from real-world geospatial sources. Unlike platforms that require handcrafted 3D maps, Sinclair procedurally builds scenes from OpenStreetMap data — enabling LiDAR simulation for any location on Earth.

Features

Sensors

  • Velodyne VLP-16 — 16-channel, 360° spinning, 28,800 points/frame
  • Velodyne HDL-64E — 64-channel, 360° spinning, 288,000 points/frame
  • Luminar Iris — solid-state, 120°×26° FOV, 1.2M+ points/frame, RoI scanning

Simulation

  • Real-time raycasting against BVH-accelerated scene geometry
  • Doppler velocity — radial velocity computation for moving and static objects
  • Real-time classification — ASPRS LAS standard (building, road, vehicle, vegetation, etc.)
  • NPC traffic — vehicles spawned on roads from OSM density data, detectable by LiDAR
  • Vehicle dynamics — bicycle model with manual (WASD) and autoplay (road-following) modes
  • Point cloud accumulation — SLAM-like progressive scene mapping
  • Atmospheric effects — Beer-Lambert attenuation, precipitation ghost points

Scene Construction

  • OpenStreetMap buildings, roads, land use via Overpass API
  • Building extrusion with varied heights (OSM tags + area-based estimation)
  • Road mesh generation with sidewalks and curbs
  • SRTM elevation data for terrain
  • Sentinel-2 surface classification for material mapping
  • Real-time weather from Open-Meteo API

Visualization

  • 2.5D isometric viewport with pan, zoom, rotate (Shift+drag), tilt
  • Three color modes (press C): Distance, Doppler Velocity, Classification
  • Doppler overlay (press X): surface-conforming velocity visualization
  • Heatmap mode (press H): accumulated scan density with Gaussian smoothing
  • Landmark map (press L): top-down OSM map with road names and POIs
  • Compass ruler with heading indicator
  • Color legend adapting to active visualization mode

Export

  • KITTI format (.bin + .label + poses.txt)
  • PCD (Point Cloud Data) format
  • LAS 1.4 with classification
  • Session metadata (JSON)

Quick Start

# Clone
git clone https://github.com/pacifio/sinclair.git
cd sinclair

# Run
cargo run -p sinclair-gui

# Or use the dev script (checks + tests + run)
./run_dev.sh

Controls

Key Action
W / S Accelerate / Brake
A / D Steer left / right
Drag Pan the camera
Scroll / Pinch Zoom in/out
Shift + Drag Rotate (horizontal) / Tilt (vertical)
C Cycle color mode: Distance → Velocity → Classification
X Toggle Doppler velocity overlay
H Toggle heatmap view
L Toggle landmark map view

Architecture

sinclair/
├── crates/
│   ├── sinclair-core          # Shared types, math, coordinates
│   ├── sinclair-geo           # OSM, SRTM, weather, Nominatim, tile cache
│   ├── sinclair-scene         # Building extrusion, road mesh, materials
│   ├── sinclair-raycaster     # BVH construction, CPU/GPU ray casting
│   ├── sinclair-sensors       # LiDAR sensor models (VLP-16, HDL-64E, Iris)
│   ├── sinclair-vehicle       # Bicycle model dynamics, pure pursuit controller
│   ├── sinclair-traffic       # NPC vehicle spawning and density
│   ├── sinclair-atmosphere    # Beer-Lambert attenuation, ghost points
│   ├── sinclair-export        # KITTI, PCD, LAS, metadata writers
│   └── sinclair-gui           # egui application, 2.5D renderer, panels

No API Keys Required

All external APIs are free and keyless:

API Purpose
Overpass (OpenStreetMap) Buildings, roads, land use
Nominatim Location search / geocoding
OpenTopography (SRTM) Elevation tiles
Open-Meteo Real-time weather
Element84 Earth Search Sentinel-2 satellite imagery

Data is cached locally at ~/.sinclair/cache/.

Doppler Velocity

Sinclair simulates radial Doppler velocity for each LiDAR return:

v_radial = (v_target - v_sensor) · ray_direction
  • Static objects (buildings, roads): velocity from ego motion only
  • Moving objects (NPC vehicles): relative velocity between sensor and target
  • Visualized as blue (approaching) → white (static) → red (receding)

Classification

Each point is classified using the ASPRS LAS standard based on the surface material:

Class Code Color
Building 6 Gray
Road 11 White
Sidewalk 12 Light gray
Vehicle 13 Blue
Vegetation 5 Green
Ground 2 Green
Water 9 Blue
Traffic Sign 16 Yellow

Requirements

  • Rust 1.70+
  • macOS (Apple Silicon primary) or Linux
  • No GPU required (CPU raycasting), but Metal/Vulkan available for future GPU acceleration

License

MIT — see LICENSE

About

Synthetic LiDAR simulation platform for autonomous vehicle research.

Topics

Resources

License

Stars

Watchers

Forks

Contributors