Expand description
§Embedded Camsense-X1
Platform agnostic Rust driver for the Camsense-X1 LiDAR sensor, based on the embedded-hal traits.
This library provides a no_std interface for interacting with the Camsense-X1 LiDAR sensor.
Most of the information about the inner workings of the LiDAR was taken from:
§Features
no_std& zero-allocations: Fully compatible with bare-metal and RTOS targets. Uses fixed-size arrays and avoids heap allocation.- Platform-Agnostic I/O: Built on
embedded-hal,embedded-iotraits for blocking,embedded-hal-asyncandembedded-io-asyncfor asynchronous communication, supporting any UART peripheral and delay backend. - Blocking and Asynchronous Interfaces: Provides interfaces for both blocking and asynchronous (
asyncfeature) communication. - Robust Protocol Synchronization: Const-generic state machine for byte-level frame detection with automatic recovery from noisy UART lines.
- Checksum Validation: Implements exact SDK algorithm (linear accumulator with 15-bit folding) to silently drop corrupted frames.
§Device
The Camsense-X1 is a cost-effective consumer-level LiDAR with the following characteristics1:
| Description | Parameter value |
|---|---|
| Operating range | 100mm - 8000mm |
| Repeatability | <0.5% |
| Absolute accuracy | <2% |
| Angle resolution | 0.9° |
| Rotating speed | 312±10 RPM |
| Power consumption | <2W |
| Laser light source | 780nm EEL/808nm VCSEL laser |
| Laser safety level | IEC60825 Class I |
§Examples
See the examples directory for examples of using the Camsense-X1 with different micro-controllers and boards.
§Feature Flags
defmt- Enable logging output usingdefmtand implementdefmt::Formaton certain types.async- Enable asynchronous interface.
§License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
§Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Re-exports§
pub use driver::blocking::CamsenseX1;pub use driver::asynchronous::CamsenseX1 as CamsenseX1Async;
Modules§
Structs§
- Config
- Camsense-X1 LiDAR sensor driver configuration.
- Partial
Scan - A single partial scan containing up to
NUMBER_OF_POINTS_PER_MEASUREMENTvalid points. - Scan
- A complete 360° LiDAR scan.
Enums§
- Error
- Errors that can occur during Camsense-X1 communication or packet parsing.