unitree-lidar-l1-rust

Crates.iounitree-lidar-l1-rust
lib.rsunitree-lidar-l1-rust
version0.1.0
created_at2025-07-08 08:28:21.83735+00
updated_at2025-07-08 08:28:21.83735+00
descriptionRust wrapper for Unitree Lidar L1 SDK
homepagehttps://github.com/godbrigero/Unilidar-SDK-Rust
repositoryhttps://github.com/godbrigero/Unilidar-SDK-Rust
max_upload_size
id1742196
size940,411
godbrigero (godbrigero)

documentation

https://docs.rs/unitree-lidar-l1-rust

README

Unitree Lidar SDK

What is this?

As you know, the official SDK is not available for rust users since it it written in C++. This project is a wrapper for the official SDK that allows you to use the SDK in rust.

Supported platforms

  • Linux x86_64
  • Linux aarch64

Installation

From crates.io

cargo add unitree-lidar-l1-rust

The static libraries are included in the published crate, so no additional setup is required!

From Source

git clone https://github.com/yourusername/unitree_lidar_l1_rust
cd unitree_lidar_l1_rust
cargo build

How to use?

let mut reader = LidarReader::new("/dev/ttyUSB0", 0.0, 50.0).unwrap();
reader.start_lidar();
let mut stream = reader.into_stream();

while let Some(result) = stream.next() {
    match result {
        LidarResult::PointCloud(points) => {
            println!("Point cloud: {:?}", points);
        }
        LidarResult::ImuReading(imu) => {
            println!("IMU reading: {:?}", imu);
        }
    }
}

How to build?

cargo build
Commit count: 0

cargo fmt