Skip to content

jeroenvervaeke/delta_2a_lidar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Delta-2A lidar driver

Build Status Crates.io Documentation

About

This crate contains a rust driver implementation for the 3irobotix delta-2A Lidar Sensor.

Features

  • Read distance frames
  • Read lidar speed (WIP)
  • Read/write measurements to file + abstractions to mock sensor (behind file feature)

Dependencies

This library uses the serialport crate which requires libudev-dev to be installed on your system. On Ubuntu:

sudo apt-get update && sudo apt-get install -y libudev-dev

Examples

List al lidar sensors

This simple example prints all found lidar sensors.

use delta_2a_lidar::Lidar;

for sensor in Lidar::enumerate().unwrap() {
  println!("Found lidar sensor: {}", sensor);
}

Read incoming packages

This simple example prints all incoming packages from the first lidar sensor we find

use delta_2a_lidar::Lidar;

// Get all lidars
let mut lidar_names = Lidar::enumerate().unwrap();

// Take the first lidar
let lidar_name = lidar_names.next().unwrap();

// Open the lidar
let mut lidar = Lidar::open(lidar_name).unwrap();

// Read packages as long as the lidar produces packages
while let Some(package) = lidar.next().await {
  println!("Received package: {:?}", package);
}

About

Rust driver for the 3irbotix delta 2A lidar sensor

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages