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, X4-PRO, X3, X3-PRO, X2/X2L, SCL 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.
Please see the examples
folder for sample Arduino sketches.
Please follow this tutorial to connect LDROBOT LD14P to Arduino ESP32.
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
- 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
- ESP32-S3 has only two UARTs, as opposed to ESP32 having 3 UARTS
- When using the YD ESP32-S3, consider the default TX1, RX1 GPIO15 and GPIO16 pins and change the example code to
HardwareSerial LidarSerial(1);
- When using the YD ESP32-S3, consider the default TX1, RX1 GPIO15 and GPIO16 pins and change the example code to
//ESP32-S3
//HardwareSerial LidarSerial(2);
HardwareSerial LidarSerial(1);
...
//LidarSerial.begin(baud_rate); // Use default GPIO TX 17, RX 16
LidarSerial.begin(baud_rate, SERIAL_8N1, 16, 15); // GPIO16 as RX1, GPIO15 as TX1
- ESP32-C3 has only two UARTs, as opposed to ESP32 having 3 UARTS
- use UART1 for LiDAR and, for example, GPIO4 as RX1 and GPIO5 as TX
//ESP32-C3
//HardwareSerial LidarSerial(2);
HardwareSerial LidarSerial(1);
...
//LidarSerial.begin(baud_rate); // Use default GPIO TX 17, RX 16
LidarSerial.begin(baud_rate, SERIAL_8N1, 4, 5); // GPIO4 as RX1, GPIO5 as TX1
- 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.
- added ESP32-C3 LD14P example
- added ESP32-S3 LD14P example
- LDROBOT LD14P commands
- start, stop motor
- set, get scan frequency
- added YDLIDAR X4-PRO
- added YDLIDAR SCL
- compilation bugfix
- added CAMSENSE X1
- example sketch fix
- added Delta-2A 230400 baud
- added Delta-2B
- Camsense X1
- added LDROBOT LD14P
- bugfix
lds_all_models.h
include file
- added Delta-2A, Delta-2G
- added Neato XV11
- added RPLIDAR A1
- added YDLIDAR X3, X3 PRO
- report scan RPM for all sensor models
- added YDLIDAR X2/X2L
- measure RPM for YDLIDAR X4, YDLIDAR X2/X2L
- virtual class methods
- ESP32 crash workaround by moving init code from constructor out to init()
- example bugfix
- renamed classes
- initial release
- add Xiaomi Roborock LDS01RR
- add LDROBOT LD20
- add LDROBIT LD19P, https://github.com/Myzhar/ldrobot-lidar-ros2
- add Hitachi-LG HLS-LFCD2
- add Dreame TBD
- reduce raw data volume
- omit measurement quality since it usually does not get used