{"id":20270574,"url":"https://github.com/kaiaai/lds","last_synced_at":"2025-04-06T04:06:52.591Z","repository":{"id":217226339,"uuid":"743314949","full_name":"kaiaai/LDS","owner":"kaiaai","description":"Arduino LiDAR library supporting YDLIDAR X2/X3/X4, RPLIDAR A1, Xiaomi LDS02RR, Neato XV11, LD14P, CAMSENSE X1, Delta-2A/2B/2G","archived":false,"fork":false,"pushed_at":"2025-03-11T11:53:01.000Z","size":224,"stargazers_count":112,"open_issues_count":2,"forks_count":11,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-30T03:09:11.822Z","etag":null,"topics":["3irobotix","arduino-library","camsense","ldrobot","lds02rr","lidar","rplidar","slamtec","ydlidar"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kaiaai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-15T00:22:43.000Z","updated_at":"2025-03-25T16:46:11.000Z","dependencies_parsed_at":"2024-03-18T22:23:46.714Z","dependency_job_id":"94314a6f-6a1e-4fa5-a466-8eb1fca996bd","html_url":"https://github.com/kaiaai/LDS","commit_stats":null,"previous_names":["kaiaai/lds_kaiaai"],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaiaai%2FLDS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaiaai%2FLDS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaiaai%2FLDS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaiaai%2FLDS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kaiaai","download_url":"https://codeload.github.com/kaiaai/LDS/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247430864,"owners_count":20937874,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3irobotix","arduino-library","camsense","ldrobot","lds02rr","lidar","rplidar","slamtec","ydlidar"],"created_at":"2024-11-14T12:31:32.311Z","updated_at":"2025-04-06T04:06:52.568Z","avatar_url":"https://github.com/kaiaai.png","language":"C++","readme":"# LiDAR Library for Arduino\nLaser distance scan sensor (LIDAR) Arduino wrapper/controller for [kaia.ai](https://kaia.ai) home robot software platform.\nPlease check out the [Awesome 2D LiDARs list](https://github.com/kaiaai/awesome-2d-lidars)\nand read this [blog post](https://kaia.ai/blog/arduino-lidar-library/) for more details.\n\nPlease visit the [Support Forum](https://github.com/makerspet/support/discussions/)!\n\nThis library supports:\n- YDLIDAR X4, X4-PRO, X3, X3-PRO, X2/X2L, SCL models\n- SLAMTEC RPLIDAR A1\n- Neato XV11/Botvac\n- Xiaomi Roborock Mi 1st gen LDS02RR\n- 3irobotix Delta-2A, Delta-2B, Delta-2G, Delta-2A 115000 baud\n  - Note: there is a fixed pattern noise issue that needs debug\n- LDROBOT LD14P\n- CAMSENSE X1\n\nOther models are in the works.\n\n![LDS_collection_labeled_v3](https://github.com/kaiaai/LDS/assets/33589365/7b6a6a6f-a27c-45de-99c9-9e60d17b4d14)\n\n### Video: YDLIDAR SCL runs on Arduino, ROS2\n\u003ca href=\"http://www.youtube.com/watch?feature=player_embedded\u0026v=7mj5hnlwmx4\" target=\"_blank\"\u003e\n \u003cimg src=\"http://img.youtube.com/vi/7mj5hnlwmx4/maxresdefault.jpg\" alt=\"YDLIDAR SCL laser distance scan sensor runs on Arduino, ROS2\" width=\"720\" height=\"405\" border=\"10\" /\u003e\n\u003c/a\u003e\n\n### Video: Neato XV11 runs on Arduino, ROS2\n\u003ca href=\"http://www.youtube.com/watch?feature=player_embedded\u0026v=kfk1Q0RSJpI\" target=\"_blank\"\u003e\n \u003cimg src=\"http://img.youtube.com/vi/kfk1Q0RSJpI/maxresdefault.jpg\" alt=\"Neato XV11 laser distance scan sensor runs on Arduino, ROS2\" width=\"720\" height=\"405\" border=\"10\" /\u003e\n\u003c/a\u003e\n\n### Video: Xiaomi Mi 1st gen LDS02RR runs on Arduino, ROS2\n\u003ca href=\"http://www.youtube.com/watch?feature=player_embedded\u0026v=gaDnZ4Msw0E\" target=\"_blank\"\u003e\n \u003cimg src=\"http://img.youtube.com/vi/gaDnZ4Msw0E/maxresdefault.jpg\" alt=\"LDS02RR laser distance scan sensor runs on Arduino, ROS2\" width=\"720\" height=\"405\" border=\"10\" /\u003e\n\u003c/a\u003e\n\n### Video: SLAMTEC RPLIDAR A1 runs on Arduino, ROS2\n\u003ca href=\"http://www.youtube.com/watch?feature=player_embedded\u0026v=f8IYjfiXsMk\" target=\"_blank\"\u003e\n \u003cimg src=\"http://img.youtube.com/vi/f8IYjfiXsMk/maxresdefault.jpg\" alt=\"RPLIDAR A1 laser distance scan sensor runs on Arduino, ROS2\" width=\"720\" height=\"405\" border=\"10\" /\u003e\n\u003c/a\u003e\n\n### Video: YDLIDAR X3 PRO runs on Arduino, ROS2\n\u003ca href=\"http://www.youtube.com/watch?feature=player_embedded\u0026v=_VuRCiO55gA\" target=\"_blank\"\u003e\n \u003cimg src=\"http://img.youtube.com/vi/_VuRCiO55gA/maxresdefault.jpg\" alt=\"YDLIDAR X3 PRO laser distance scan sensor runs on Arduino, ROS2\" width=\"720\" height=\"405\" border=\"10\" /\u003e\n\u003c/a\u003e\n\n### Video: LDROBOT LD14P runs on Arduino, ROS2\n\u003ca href=\"http://www.youtube.com/watch?feature=player_embedded\u0026v=ebbHqs4lW0U\" target=\"_blank\"\u003e\n \u003cimg src=\"http://img.youtube.com/vi/ebbHqs4lW0U/maxresdefault.jpg\" alt=\"LDROBOT LD14P LiDAR connected to Arduino, ROS2\" width=\"720\" height=\"405\" border=\"10\" /\u003e\n\u003c/a\u003e\n\n### Video: CAMSENSE X1 runs on Arduino, ROS2\n\u003ca href=\"http://www.youtube.com/watch?feature=player_embedded\u0026v=kNBraxYKvvI\" target=\"_blank\"\u003e\n \u003cimg src=\"http://img.youtube.com/vi/kNBraxYKvvI/maxresdefault.jpg\" alt=\"CAMSENSE X1 LiDAR connected to Arduino, ROS2\" width=\"720\" height=\"405\" border=\"10\" /\u003e\n\u003c/a\u003e\n\n### Video: Delta-2G runs on Arduino, ROS2\n\u003ca href=\"http://www.youtube.com/watch?feature=player_embedded\u0026v=eyn5ccR_I1Y\" target=\"_blank\"\u003e\n \u003cimg src=\"http://img.youtube.com/vi/eyn5ccR_I1Y/maxresdefault.jpg\" alt=\"CAMSENSE X1 LiDAR connected to Arduino, ROS2\" width=\"720\" height=\"405\" border=\"10\" /\u003e\n\u003c/a\u003e\n\n## Example Code\nPlease see the `examples` folder for sample Arduino sketches.\n\n## Connecting to Arduino\n- Maker's Pet offers Lidar breakout boards for ESP32 for sale in its [onine store](https://makerspet.com/store/)\n- follow [this DIY tutorial](https://kaia.ai/blog/tutorial-connect-ld14p-lidar/) to connect LDROBOT LD14P to Arduino ESP32\n\n### Adapter Boards\nSome LiDAR models do not have built-in motor control and therefore require an additional board to operate:\n- for Xiaomi Roborock 1st gen LDS02RR use [this board](https://makerspet.com/store#!/Adapter-for-LDS02RR-LiDAR/p/697091363)\n- for Neato XV11 use [this board](https://github.com/makerspet/pcb/tree/main/neato_delta_adapter)\n- for 3irobotix Delta-2A, -2B, -2C PRO, -2D, -2G use [this board](https://github.com/makerspet/pcb/tree/main/neato_delta_adapter)\n\n### ESP32 Module Variants\n- 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\n- ESP32-S3 has only two UARTs, as opposed to ESP32 having 3 UARTS\n  - When using the YD ESP32-S3, consider the default TX1, RX1 GPIO15 and GPIO16 pins and change the example code to `HardwareSerial LidarSerial(1);`\n```\n//ESP32-S3\n//HardwareSerial LidarSerial(2);\nHardwareSerial LidarSerial(1);\n...\n//LidarSerial.begin(baud_rate); // Use default GPIO TX 17, RX 16\nLidarSerial.begin(baud_rate, SERIAL_8N1, 16, 15); // GPIO16 as RX1, GPIO15 as TX1\n```\n\n- ESP32-C3 has only two UARTs, as opposed to ESP32 having 3 UARTS\n  - use UART1 for LiDAR and, for example, GPIO4 as RX1 and GPIO5 as TX\n```\n//ESP32-C3\n//HardwareSerial LidarSerial(2);\nHardwareSerial LidarSerial(1);\n...\n//LidarSerial.begin(baud_rate); // Use default GPIO TX 17, RX 16\nLidarSerial.begin(baud_rate, SERIAL_8N1, 4, 5); // GPIO4 as RX1, GPIO5 as TX1\n```\n\n## Release notes\n\n## v0.6.3\n- major bugfix: Delta, Delta-2G LiDARs decoding\n\n## v0.6.2\n- added CAMSENSE_X1 to all-lidars example\n\n## v0.6.1\n- added an all-in-one example sketch for all supported Lidar models\n  - pre-configured for LDS02RR\n- bugfixed Espressif SDK 5.x (ESP32 Arduino 3.x) build\n- examples cleanup\n\n## v0.6.0\n- support for Espressif SDK 5.x (ESP32 Arduino 3.x)\n\n## v0.5.9\n- added ESP32-C3 LD14P example\n- added ESP32-S3 LD14P example\n\n## v0.5.8\n- LDROBOT LD14P commands\n  - start, stop motor\n  - set, get scan frequency\n\n## v0.5.7\n- added YDLIDAR X4-PRO\n\n## v0.5.6\n- added YDLIDAR SCL\n\n## v0.5.5\n- compilation bugfix\n\n## v0.5.4\n- added CAMSENSE X1\n- example sketch fix\n\n## v0.5.3\n- added Delta-2A 230400 baud\n- added Delta-2B\n\n## v0.5.3\n- Camsense X1\n\n## v0.5.2\n- added LDROBOT LD14P\n\n## v0.5.1\n- bugfix `lds_all_models.h` include file\n\n## v0.5.0\n- added Delta-2A, Delta-2G\n\n## v0.4.0\n- added Neato XV11\n- added RPLIDAR A1\n- added YDLIDAR X3, X3 PRO\n- report scan RPM for all sensor models\n\n### v0.3.1\n- added YDLIDAR X2/X2L\n- measure RPM for YDLIDAR X4, YDLIDAR X2/X2L\n\n### v0.3.0\n- virtual class methods\n- ESP32 crash workaround by moving init code from constructor out to init()\n\n### v0.2.0\n- example bugfix\n- renamed classes\n\n### v0.1.0\n- initial release\n\n## TODO\n- add Xiaomi Roborock LDS01RR\n- add LDROBOT LD20\n- add LDROBIT LD19P, https://github.com/Myzhar/ldrobot-lidar-ros2\n- add Hitachi-LG HLS-LFCD2\n- add Dreame TBD\n- reduce raw data volume\n  - omit measurement quality since it usually does not get used\n\n## Star History\n[![Star History Chart](https://api.star-history.com/svg?repos=kaiaai/LDS\u0026type=Date)](https://star-history.com/#kaiaai/LDS\u0026Date)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaiaai%2Flds","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkaiaai%2Flds","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaiaai%2Flds/lists"}