DriveLogger
Android app that turns phones into autonomous-vehicle data-acquisition devices
- Status
- Research
- Version
- 0.1.0
- Platform
- Android app
- License
- Not specified
Phone-based data collection for autonomous driving, mapping, SLAM and dataset generation needs tightly time-aligned sensor logs in a standard format that existing tools can read.
How it is put together.
DriveLogger is a Kotlin Android app that records synchronized multi-sensor data from a phone and exports each trip as an MCAP log (trip.mcap), an MP4 video sidecar (trip.mp4) and a dataset metadata.json. Because Foxglove ships no Java/Kotlin MCAP library, the app includes its own MCAP writer with protobuf messages, LZ4-compressed chunks, a summary section, CRC checks and a crash-recovery tool, so trips open directly in Foxglove Studio. All streams are aligned to one monotonic timebase, and video frames are referenced from MCAP by metadata only. Trips can be uploaded to S3/MinIO with resumable multipart upload.
- 1
App UI
Compose screens (Dashboard, Trips, TripDetail, Settings), ViewModels, navigation
app/ - 2
Recording
Foreground service, TripRecorder, CameraController, MetadataGenerator, recovery
recording/ - 3
Sensors
SensorSource seam with IMU, GNSS, environment and telemetry sources
sensors/ - 4
MCAP writer
McapWriter, async actor writer, LZ4 chunks, McapRecoveryTool
core/mcap/ - 5
Clock
MonotonicClock, ClockSynchronizer, DriftMonitor
core/clock/ - 6
Events
EventDetector with pluggable EventRule set
events/ - 7
Upload
CloudStorageProvider, S3/MinIO multipart, UploadWorker
upload/
Specification.
- Output
- trip.mcap + trip.mp4 sidecar + metadata.json per trip
- MCAP writer
- Custom Kotlin writer: protobuf schemas, LZ4 chunks with message indexes, summary section, CRC, crash recovery
- Schemas
- Foxglove well-known schemas (foxglove.LocationFix) plus custom sensor types
- Time sync
- All streams on SystemClock.elapsedRealtimeNanos(); clock synchronizer and drift monitor
- Sensors
- IMU, GNSS, environment, telemetry, camera frame metadata; OBD example source
- Events
- Pluggable EventRule set feeding an /events topic
- Cloud upload
- S3/MinIO SigV4 multipart, resumable, checksum-validated; credentials in Android Keystore
- Platform
- Android minSdk 26, targetSdk 35
- Runs on
- Kotlin/Jetpack Compose Android app built and installed with Gradle