Skip to content

Commit a5335da

Browse files
author
Ilia O.
committed
Add LDS01RR
1 parent faae5f5 commit a5335da

8 files changed

Lines changed: 57 additions & 3 deletions

File tree

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ This library supports:
1616
- CAMSENSE X1
1717

1818
### Experimental (needs testing)
19+
- Xiaomi Roborock LDS01RR (2nd gen, ToF) - same protocol as Neato XV11
1920
- LDROBOT LD06 (same protocol as LD19)
2021
- LDROBOT STL-19P / D500 (same protocol as LD19)
2122
- Hitachi-LG HLS-LFCD2 / LDS-01 (TurtleBot3 LiDAR)
@@ -180,10 +181,8 @@ LidarSerial.begin(baud_rate, SERIAL_8N1, 4, 5); // GPIO4 as RX1, GPIO5 as TX1
180181
- initial release
181182

182183
## TODO
183-
- add Xiaomi Roborock LDS01RR
184184
- add LDROBOT LD20
185185
- add LDROBIT LD19P, https://github.com/Myzhar/ldrobot-lidar-ros2
186-
- add Hitachi-LG HLS-LFCD2
187186
- add Dreame TBD
188187
- reduce raw data volume
189188
- omit measurement quality since it usually does not get used

examples/all_lidars_lds02rr_esp32/all_lidars_lds02rr_esp32.ino

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ const uint8_t LIDAR_GPIO_PWM = 15;// ESP32 GPIO connected to Lidar PWM pin
4848
//#define CAMSENSE_X1
4949
//
5050
// EXPERIMENTAL - needs testing:
51+
//#define XIAOMI_LDS01RR
5152
//#define LDROBOT_LD06
5253
//#define LDROBOT_LD19
5354
//#define LDROBOT_STL19P
@@ -113,6 +114,9 @@ void setupLidar() {
113114
lidar = new LDS_YDLIDAR_X4_PRO();
114115
#elif defined(CAMSENSE_X1)
115116
lidar = new LDS_CAMSENSE_X1();
117+
// EXPERIMENTAL - needs testing:
118+
#elif defined(XIAOMI_LDS01RR)
119+
lidar = new LDS_LDS01RR();
116120
#elif defined(LDROBOT_LD06)
117121
lidar = new LDS_LDROBOT_LD06();
118122
#elif defined(LDROBOT_LD19)

examples/all_lidars_lds02rr_esp32s3/all_lidars_lds02rr_esp32s3.ino

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ const uint8_t LIDAR_GPIO_PWM = 15;// ESP32S3 GPIO connected to Lidar PWM pin
4848
//#define CAMSENSE_X1
4949
//
5050
// EXPERIMENTAL - needs testing:
51+
//#define XIAOMI_LDS01RR
5152
//#define LDROBOT_LD06
5253
//#define LDROBOT_LD19
5354
//#define LDROBOT_STL19P
@@ -115,6 +116,8 @@ void setupLidar() {
115116
#elif defined(CAMSENSE_X1)
116117
lidar = new LDS_CAMSENSE_X1();
117118
// EXPERIMENTAL - needs testing:
119+
#elif defined(XIAOMI_LDS01RR)
120+
lidar = new LDS_LDS01RR();
118121
#elif defined(LDROBOT_LD06)
119122
lidar = new LDS_LDROBOT_LD06();
120123
#elif defined(LDROBOT_LD19)

keywords.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ LDS_YDLIDAR_X2_X2L KEYWORD1
1515
LDS_YDLIDAR_SCL KEYWORD1
1616
LDS_NEATO_X11 KEYWORD1
1717
LDS_LDS02RR KEYWORD1
18+
LDS_LDS01RR KEYWORD1
1819
LDS_RPLIDAR_A1 KEYWORD1
1920
LDS_RPLIDAR_C1 KEYWORD1
2021
LDS_DELTA_2A_230400 KEYWORD1

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version=0.6.3
33
author=Ilia O. <iliao@kaia.ai>
44
maintainer=Ilia O. <iliao@kaia.ai>
55
sentence=Laser distance scan sensors (LDS/LIDAR) wrapper/controller for kaia.ai robotics platform
6-
paragraph=Supports YDLIDAR X4, X4 PRO, X3, X3 PRO, X2/X2L, SCL, T-mini; Xiaomi Roborock 1st gen LDS02RR; Neato XV11; SLAMTEC RPLIDAR A1, C1; 3irobotix Delta-2A, -2B, -2D, -2G, LDS08RR, -2A 115000; LDROBOT LD14P, LD19, LD06, STL-19P; Hitachi-LG HLS-LFCD2; CAMSENSE X1
6+
paragraph=Supports YDLIDAR X4, X4 PRO, X3, X3 PRO, X2/X2L, SCL, T-mini; Xiaomi Roborock LDS02RR, LDS01RR; Neato XV11; SLAMTEC RPLIDAR A1, C1; 3irobotix Delta-2A, -2B, -2D, -2G, LDS08RR, -2A 115000; LDROBOT LD14P, LD19, LD06, STL-19P; Hitachi-LG HLS-LFCD2; CAMSENSE X1
77
category=Sensors
88
url=https://github.com/kaiaai/LDS
99
architectures=*

src/LDS_LDS01RR.cpp

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Copyright 2023-2025 KAIA.AI
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
//
15+
// EXPERIMENTAL - needs testing
16+
// Xiaomi Roborock LDS01RR (2nd gen, ToF) - same protocol as Neato XV11
17+
18+
#include "LDS_LDS01RR.h"
19+
20+
const char* LDS_LDS01RR::getModelName() {
21+
return "Xiaomi LDS01RR";
22+
}

src/LDS_LDS01RR.h

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// Copyright 2023-2025 KAIA.AI
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
//
15+
// EXPERIMENTAL - needs testing
16+
// Xiaomi Roborock LDS01RR (2nd gen, ToF) - same protocol as Neato XV11
17+
18+
#pragma once
19+
#include "LDS_NEATO_XV11.h"
20+
21+
class LDS_LDS01RR : public LDS_NEATO_XV11 {
22+
public:
23+
virtual const char* getModelName() override;
24+
};

src/lds_all_models.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include "LDS_YDLIDAR_SCL.h"
2323
#include "LDS_NEATO_XV11.h"
2424
#include "LDS_LDS02RR.h"
25+
#include "LDS_LDS01RR.h"
2526
#include "LDS_RPLIDAR_A1.h"
2627
#include "LDS_RPLIDAR_C1.h"
2728
#include "LDS_DELTA_2A_115200.h"

0 commit comments

Comments
 (0)