LDS
LDS copied to clipboard
Arduino LiDAR library supporting YDLIDAR X2/X3/X4, RPLIDAR A1, Xiaomi LDS02RR, Neato XV11, LD14P, CAMSENSE X1, Delta-2A/2B/2G
LiDAR Library for Arduino
Laser distance scan sensor (LIDAR) Arduino wrapper/controller for kaia.ai home robot software platform. Please check out the Awesome 2D LiDARs list and read this blog post for more details.
Please visit the Support Forum!
This library supports:
- YDLIDAR X4, X3, X3-PRO, X2/X2L models
- SLAMTEC RPLIDAR A1
- Neato XV11/Botvac
- Xiaomi Roborock Mi 1st gen LDS02RR
- 3irobotix Delta-2A, Delta-2B, Delta-2G, Delta-2A 115000 baud
- Note: there is a fixed pattern noise issue that needs debug
- LDROBOT LD14P
- CAMSENSE X1
Other models are in the works.
Video: Neato XV11 runs on Arduino, ROS2

Video: Xiaomi Mi 1st gen LDS02RR runs on Arduino, ROS2

Video: SLAMTEC RPLIDAR A1 runs on Arduino, ROS2

Video: YDLIDAR X3 PRO runs on Arduino, ROS2

Video: LDROBOT LD14P runs on Arduino, ROS2

Video: CAMSENSE X1 runs on Arduino, ROS2

Video: Delta-2G runs on Arduino, ROS2

Connecting to Arduino
Please follow this tutorial to connect LDROBOT LD14P to Arduino ESP32.
Adapter Boards
Some LiDAR/LDS models do not have built-in motor control and therefore require an additional board to operate:
- for Xiaomi Roborock 1st gen LDS02RR use this board
- for Neato XV11 use this board
- for 3irobotix Delta-2A, -2B, -2C PRO, -2D, -2G use this board
ESP32 Modules
- When using the ESP32 WROVER board, it's worth using pins 32 and 33 instead of pins 16 and 17, which are used for QSPI
- When using the YD ESP32-S3, consider the default TX1, RX1 GPIO15 and GPIO16 pins and change the example code to
HardwareSerial LidarSerial(1);
Performance Notes
- currently Delta-2A, -2B, -2G exhibit mysterious fixed pattern noise
- this noise does NOT show when using 3irobotix development kit, so it should be fix-able (somehow)
- so far I haven't heard back from 3irobotix support.
Release notes
v0.5.5
- compilation bugfix
v0.5.4
- added CAMSENSE X1
- example sketch fix
v0.5.3
- added Delta-2A 230400 baud
- added Delta-2B
v0.5.3
- Camsense X1
v0.5.2
- added LDROBOT LD14P
v0.5.1
- bugfix
lds_all_models.h
include file
v0.5.0
- added Delta-2A, Delta-2G
v0.4.0
- added Neato XV11
- added RPLIDAR A1
- added YDLIDAR X3, X3 PRO
- report scan RPM for all sensor models
v0.3.1
- added YDLIDAR X2/X2L
- measure RPM for YDLIDAR X4, YDLIDAR X2/X2L
v0.3.0
- virtual class methods
- ESP32 crash workaround by moving init code from constructor out to init()
v0.2.0
- example bugfix
- renamed classes
v0.1.0
- initial release
TODO
- add Xiaomi Roborock LDS01RR
- add LDROBOT LD20
- add LDROBIT LD19P, https://github.com/Myzhar/ldrobot-lidar-ros2
- add YDLIDAR SCL
- add Hitachi-LG HLS-LFCD2
- add Dreame TBD
- reduce raw data volume
- omit measurement quality since it usually does not get used