Skip to content

A real-time sensor data pipeline for robotics in Rust

Notifications You must be signed in to change notification settings

HueCodes/Sensor-Bridge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sensor-Bridge

A production-grade, real-time sensor processing pipeline for robotics in Rust.

Features

  • Multi-stage pipeline with dedicated threads (Ingestion, Filtering, Aggregation, Output)
  • Lock-free SPSC ring buffer (0.3ns push, 9ns pop)
  • Composable processing stages (filters, transforms, fusion)
  • Zero-copy data sharing with object pooling
  • Adaptive backpressure with quality degradation
  • Per-stage metrics with jitter tracking and live dashboard

Performance

Metric Result
Pipeline throughput >1M items/sec
Stage processing 2.2B items/sec
Channel latency 20ns
Ring buffer push 0.3ns

Quick Start

use sensor_pipeline::pipeline::{MultiStagePipelineBuilder, PipelineConfig};
use sensor_pipeline::stage::{Filter, Map, Identity};

let mut pipeline = MultiStagePipelineBuilder::<i32, i32, _, _, _, _>::new()
    .config(PipelineConfig::default())
    .ingestion(Map::new(|x: i32| x + 1))
    .filtering(Filter::new(|x: &i32| *x > 0))
    .aggregation(Map::new(|x: i32| x * 2))
    .output(Identity::new())
    .build();

pipeline.send(5).unwrap();
let result = pipeline.try_recv();

pipeline.shutdown();
pipeline.join().unwrap();

Run Examples

cargo run --example full_pipeline
cargo run --example metrics_demo
cargo run --example benchmark_latency --release

Run Tests & Benchmarks

cargo test
cargo bench

License

MIT OR Apache-2.0

About

A real-time sensor data pipeline for robotics in Rust

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages