Skip to content

cnwzhjs/rplidar.rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

[dependencies]
rplidar_drv = "0.5.0"

To use RPLIDAR Rust SDK is quite simple:

extern crate rplidar_drv;
extern crate serialport;

use rplidar_drv::RplidarDevice;

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

let device_info = rplidar.get_device_info().unwrap();
rplidar.start_scan().unwrap();

while true {
    let scan_point = rplidar.grab_scan_point().unwrap();

    // use the scan point data
}