RPLiDAR and YDLiDAR: popular LiDAR families for DIY AMRs
Atlasbot · 18/8/2026 · 11 min read
When looking for a affordable 2D LiDAR for ROS2 robots, the two most prominent names are RPLiDAR (Slamtec corporation) and YDLiDAR (EAI corporation) — both using the optical triangulation principle, both with an official ROS2 driver, and both popular in the DIY robotics community and real-world AMR projects.
Key concepts
Both lines are LiDAR 2D triangulation (learned at What is LiDAR? ), output standard data sensor_msgs/LaserScan, and both have their own ROS2 driver package installed via colcon build:
| RPLiDAR | YDLiDAR | |
|---|---|---|
| Manufacturer | Slamtec | EAI (Yourdon) |
| ROS2 driver package | rplidar_ros | ydlidar_ros2_driver |
| Measurement principle | Triangulation | Triangulation |
| Product Range | A1, A2, A3, S1, S2... | X2, X4, X3 Pro, G2, G4... |
| Connection | USB (via UART - USB adapter) | USB (via UART - USB adapter) |
How it works
Both firms divide their products into multiple levels (low-cost entry-level short scan range, to high-end long scan range and higher scan frequency) — so compares the generic less significant "RPLiDAR vs YDLiDAR" by comparing 2 specific models at the same price range. For example, the YDLIDAR X3 Pro (scan range ~0.12–8m, ~8Hz, angular resolution ~0.7°) is in the entry - mid segment, comparable to the mid range models of the RPLiDAR — both good enough for small indoor AMR.
Since both outputs are in the same sensor_msgs/LaserScan standard, software (SLAM, Nav2) can switch from one carrier to another without modifying the data processing code — just changing the package driver and launching the corresponding file.
Technical details
Formulas
frequency sweep and angle resolution directly determine the number of points per round — and the formula learned in Comparative LiDAR 2D and 3D, applied to model - specific comparison:
Points_per_revolution = 360° / Angular_resolution
Example: YDLIDAR X3 Pro, angular resolution ~0.7° at 8Hz
Points_per_revolution ≈ 360/0.7 ≈ 514 points/revolution
Sample rate = Points_per_revolution × Scan_frequency
≈ 514 × 8 ≈ 4112 samples/second
Parameters
| Criterion | Entry - level (both brands) | Medium range (both brands) |
|---|---|---|
| Scan Range | ~0.1-8m | ~0.1-12m |
| frequency scan | ~5-8Hz | ~8-12Hz |
| Resolution Angle | ~0.7-1° | ~0.3-0.5° |
| Reference Price | Lowest in product range | Medium |
Practical applications
In the ROS2 community, documentation and examples for RPLiDAR are somewhat more extensive due to its earlier appearance, but YDLiDAR is also well supported and the driver ydlidar_ros2_driver is regularly updated for ROS2 Humble and later. In real-world, the difference in data quality between two firms at the same price segment is not large — decisions are often based on price, availability, and which drivers are better compatible with the ROS2 version in use. This is the type of LiDAR YDLIDAR X3 Pro used in this site's showcase (Robot Mecanum, Diff Robot) — real-world selection for small indoor AMR.
Practical example
# Install RPLiDAR drivers
git clone https://github.com/Slamtec/rplidar_ros.git -b ros2
colcon build --packages-select rplidar_ros
ros2 launch rplidar_ros rplidar_a1_launch.py
# Install YDLiDAR driver
git clone https://github.com/YDLIDAR/ydlidar_ros2_driver.git
colcon build --packages-select ydlidar_ros2_driver
ros2 launch ydlidar_ros2_driver ydlidar_launch.py
Both publish /scan using the standard sensor_msgs/LaserScan type, so downstream nodes
(slam_toolbox, Nav2) do not need to know which manufacturer is used:
ros2 topic echo /scan --once
# Identical output structure whether the RPLiDAR or YDLiDAR driver is running
Common mistakes
- Comparing generic "RPLiDAR vs YDLiDAR" rather than 2 models of the same price range — as stated, the two brands have a wide product range, the generic comparison does not reflect the real-world choice to consider.
- Do not check whether the driver supports the correct ROS2 version in use — drivers of both companies are updated for each ROS2 version (Humble, Iron, Jazzy...), using old drivers with new ROS2 may result in build errors or missing features.
- Mismatching nominal scan range parameters with real-world reliable scan range— maximal scan range on datasheet is generally more optimistic than real-world conditions (poor reflective surface, strong ambient light).
- Failure to take advantage of easy carrier switching over the common standard LaserScan — writing code that processes hard-mounted data according to a particular carrier, losing the common standard compatibility advantage when sensor switching is needed later.
Conclusion
RPLiDAR and YDLiDAR are both safety options for LiDAR 2D in the AMR ROS2 — project instead of choosing by name, a specific model should be compared according to the range/frequency scan demand, and a model with a stable ROS2 driver should be preferred for the correct ROS2 version in use. The next article in the column goes into the noise filtering of raw LiDAR data — critical processing step before inclusion in SLAM.
Get new articles and lessons by email
When a new technical article or course module is published, Atlas Robotics sends you a short email. No spam.
Unsubscribe any time with the link in each email. See our Privacy policy.