Arduino LiDAR library available

Developer Update – I have combined support for various spinning LiDAR/LDS sensors into an Arduino LDS library with a single platform API. You can install this library from the Arduino Library Manager GUI.

Why support many LiDAR/LDS sensors? The reason is to make the hardware – supported by Kaia.ai platform – affordable to as many prospective users as possible. Some of the sensors listed below are sold as used robot vacuum cleaner spare parts and cost as low as $9 or so (including shipping) available on AliExpress.

Here is a list of supported and to-be-supported (*) low-cost LiDAR/LDS sensors. “Tria” indicates triangulation LDS, as opposed to “ToF” time-of-flight LiDARs. You can purchase these sensors off AliExpress, Amazon, eBay and online stores that cater to robotics enthusiasts. The retail prices are approximate, as of 02/2024. The safety class indicates what the model’s official datasheet says available.

Please find the latest 2D LiDAR table here.

Here are examples of using the Arduino LDS library:

This is what the Arduino LiDAR/LDS library does:

  • Wraps various LiDAR/LDS sensors into a single platform API
  • Adds PWM PID control to LiDARs/LDS that lack built-in motor control
  • Adds API for easy integration with sensor telemetry middleware including micro-ROS, Websockets, etc.
    • a callback to forward sensor data packet stream
  • optional real-time angle and distance computation on the Arduino MCU
    • e.g. for low-latency object avoidance
Video: Neato XV11 working with ROS2 using micro-ROS, Arduino LDS library
YouTube player
Video: Xiaomi Mi 1st gen LDS02RR working with ROS2 using micro-ROS, Arduino LDS library
YouTube player
Video: RPLIDAR A1 working with ROS2 using micro-ROS, Arduino LDS library
YouTube player

ROS2 Companion Package

Kaia.ai robot firmware forwards LDS raw data – obtained from the Arduino LDS library – to a PC running ROS2 and micro-ROS. The ROS2 PC kaiaai_telemetry package receives the raw LDS data, decodes that data and publishes it to the ROS2 /scan topic. If you are a ROS2 developer or enthusiast, please feel free to take a loot – and reuse – the kaiaai_telemetry ROS2 package.

Adapter Board

Some of the LiDAR/LDS sensors listed above do not have built-in motor control. These sensors (LDS02RR, Neato XV11, Delta-2G, Delta-2A, etc.) therefore require an additional boards that implements the motor control:

  • Maker’s Pet adapter board for LDS02RR LiDAR
  • Maker’s Pet driver board with 2D LiDAR support for 30-pin ESP32 development boards
  • Maker’s Pet driver board with 2D LiDAR support for 38-pin ESP32 development boards
Video: Adapter PCB for Xiaomi LDS02RR
YouTube player

Leave a Reply

Your email address will not be published. Required fields are marked *