Build Status

Slamtec RPLIDAR Public SDK for Rust

Introduction

Slamtec RPLIDAR(https://www.slamtec.com/lidar/a3) series is a set of high-performance and low-cost LIDAR(https://en.wikipedia.org/wiki/Lidar) sensors, which is the perfect sensor of 2D SLAM, 3D reconstruction, multi-touch, and safety applications.

This is the public SDK of RPLIDAR products in Rust, and open-sourced under GPLv3 license.

If you are using ROS (Robot Operating System), please use our open-source ROS node directly: https://github.com/slamtec/rplidar_ros .

If you are just evaluating RPLIDAR, you can use Slamtec RoboStudio(https://www.slamtec.com/robostudio) (currently only support Windows) to do the evaulation.

Development Roadmap

Please see Roadmap for details.

Release Notes

Supported Platforms

RPLIDAR SDK supports Windows, macOS and Linux by using Visual Studio 2010 projects and Makefile.

| LIDAR Model \ Platform | Windows | macOS | Linux | | ---------------------- | ------- | ----- | ------- | | A1 | Yes | Yes | Yes | | A2 | Yes | Yes | Yes | | A3 | Yes | No | Yes |

Quick Start

This crate works with Cargo and is on crates.io. Add it to your Cargo.toml like so:

toml [dependencies] rplidar_drv = "0.5.0"

To use RPLIDAR Rust SDK is quite simple:

```rust extern crate rplidar_drv; extern crate serialport;

use rplidar_drv::RplidarDevice;

let mut serialport = serialport::open("COM3").unwrap(); let mut rplidar = RplidarDevice::withstream(serial_port);

let deviceinfo = rplidar.getdeviceinfo().unwrap(); rplidar.startscan().unwrap();

while true { let scanpoint = rplidar.grabscan_point().unwrap();

// use the scan point data

} ```