It’s now possible to buy small scanning 2D Lidars for less than $400 these days, which is pretty amazing, since they were as much as $30,000 a few years ago. But how good are they for small autonomous vehicles?
I put two to the test: the RP Lidar A2 (left above) and the Scanse Sweep (right). The RP Lidar A2 is the second lidar from Slamtec, a Chinese company with a good track record. Sweep is the first lidar from Scanse, a US company, and was a Kickstarter project based on the Lidar-Lite 3 1D laser range finder unit that was also a Kickstarter project a few years ago (I was an adviser for that) and is now part of Garmin.
The good news is that both work. But in practice, the difference between them become very stark, with the biggest being the four times higher resolution of the RP Lidar A2 (4,000 points per second, versus Sweep’s 1,000), which makes it actually useful outdoors in a way that Sweep is not. Read on for the details.
First, here are the basic spec comparisons:
Scanse Sweep | RP Lidar A2 | |
---|---|---|
Samples/sec | 1000 | 4000 |
Tested range | ~4-5m outdoors, ~12m indoors (much less than claimed range of 40m) | ~4-5m outdoors, ~14-16m indoors (much more than claimed range of 6m) |
Scan rate | Up to 10Hz | Up to 15Hz |
Angular resolution | 3.6 degrees | 0.9 degrees |
Height | 2.5cm | 1.5cm |
ROS integration | yes | yes |
Python driver | yes | yes |
Cost | $350 | $379 (for 2 or more), $450 (for 1) |
Bottom line: RP Lidar A2 is smaller, much higher resolution, and better range indoors (it’s notable that the real-world RP Lidar performance was above the stated specs, while the Scanse performance was below its stated specs). The Scanse desktop visualization software is better, with lots of cool options such as line detection and point grouping, but in practice you won’t use it since you’ll just be reading the data via Python in your own code. Sadly the Scanse code that does those cool things does not appear to be exposed as libraries or APIs that you can use yourself. [Update: Scanse has now released those libraries here]
In short, I recommend the RP Lidar A2.
I tested them both in small autonomous cars, as shown below (RP Lidar at left). Both were tested on a sunny day for the outdoors test, in exactly the same way.
Both have desktop apps that allow you to visualize the data. Here’s a video of the the two head-to-head scanning the same room (RP Lidar is the window on the right)
You can see difference in resolution pretty clearly in that video: the RP Lidar just has four times as many points, and thus four times higher angular resolution. That means it can not only see smaller objects at a distance, but the objects it does see have four times as many data points, making it much easier to differentiate them from background noise.
As far as using them with our RaspberryPi autonomous car software, it’s a pretty straightforward process of plugging them into the RaspberryPi via the USB port (the RP Lidar should be powered separately, see the notes below) and reading the data with Python. My code for doing this is in my Github repository here. We haven’t decided how best to integrate this data with our computer vision and neural network code, but we’re working on that now — watch this space.
The one thing that seems clear is that ROS, which has support from both lidars, is probably overkill for the simple obstacle avoidance we want the lidars for in a track racing context. It’s designed for SLAM (simultaneous location and mapping), which works too slowly for racing. So we’re implementing our own lidar integration that’s designed to just spot obstacles and avoid them.
Finally although these units are amazing and the field is making tremendous progress, we still have a long way to go. Just watch the video below to put our 2D units in context. 3D lidar is astounding, and a few years from now we may see 3D solid state lidar at the same sub-$1,000 price we can now get 2D lidar for.
A few tips and additional notes:
- Yes, it’s true that a 2D scanning lidar is just a 1D range finder on a spinning platform, but DO NOT TRY TO DO THIS YOURSELF. I’ve been there, done that, and integrating the data reliably in motion is non-trivial. Pay the extra $200 and get a proper scanning one.
- For the RPLidar, to use it with a RaspberryPi, you’ll need to power it separately. It uses a 5v power and has a tiny jack. These are the plugs that fit it.
- Of course you can always buy an old Neato unit (cannibalized from their vacuum cleaners) for $120 from eBay or Amazon. They’re pretty well supported with open source code but have much lower resolution than modern units. I think their time is gone — move on the RP Lidar instead.
- You can use an OpenMV computer vision module as a poor man’s Lidar. Total cost: $70!
- There’s a project to convert Scanse to a full 3D spherical scanner. The scanning rate will be way too slow for motion, but you could scan a room this way.
Chris, have you tested the performance of these two units outside on a sunny day?
Yes, the outdoors test was on a sunny day, as shown in the picture above.
Great. I will try the RPI2 on our tractor
Hi Chris,
Thanks for sharing this comparison with the community! We are currently in the process of putting together a robocar, and we are excited to start testing it soon.
We are quite surprised by the performance of the Sweep sensor in your comparison. Obviously the utility of Sweep varies by application, with certain strengths and weaknesses when compared to the RPLIDAR A2. However, we have never seen a Sweep sensor fail to produce accurate measurements at the ranges you report. By our testing, such poor performance would indicate a faulty sensor.
Could you elaborate on how you are evaluating the Sweep’s range performance? Are you suggesting that the Sweep cannot produce data beyond 12 meters, that the Sweep does not produce accurate enough readings at 12 meters, or that the lower angular resolution of the Sweep becomes an issue for your application at 12 meters? Although these three scenarios are quite different, a reader might easily confuse them.
The RPLIDAR A2’s higher sample rate produces a more dense angular resolution which is useful when detecting objects at range, especially when density is more important than accuracy. This is likely the case for your application. However, the RPLIDAR A2 seems to hit a range threshold after which it will stop reporting data. From our testing, this threshold on the RPLIDAR A2 is around 8 meters. Beyond this threshold Sweep is still capable of producing data that is useful for many applications where sparse data at long range is still preferable to no data at long range.
It is also worth noting that Sweep is capable of producing scans with more dense angular resolution by lowering the scan rate. There exists a trade-off where certain applications (such as high speed moving vehicles) might prioritize refresh rate over density, while less time critical applications might prioritize density over refresh rate.
Another consideration is the RP LIDAR A2 has poor cross-talk filtering, which may lead to problems in environments with several sensors operating. Sweep’s ranging technology reduces this issue, and allows many sensors to be used in close proximity to each other.
We conducted a simple comparison test both indoors(our office), and outdoors(parking lot) on a very sunny day. You can view the results here: https://s3.amazonaws.com/scanse/sweep_rplidara2_range_test.pdf
As you’ve mentioned, the code for some of the Visualizer features was not previously available. We are looking to foster a community that shares content and solutions, improving the experience for everyone. So we went ahead and released example code for a simple line extraction method similar to that used by the visualizer. The code along with comprehensive documentation are now available in a new repository for learning examples: https://github.com/scanse/sweep-learning-examples
We hope this repository will serve as the basis for more example content in the future. We encourage the community to get involved, as we collaborate to produce meaningful resources.
-Team @ Scanse
Scanse Team,
Many thanks for the insightful comments and I’m delighted to see the new code available (I’ll update the original post to reflect that).
As for the data results, the range you got was by setting the Sweep to 1Hz scans and 500 data points. Although that may give maximum range, it is of course not useful for cars, since such a slow scan and poor resolution will not allow navigation. In my testing I set both Lidars to appropriate car settings, which is 10Hz scans and maximum resolution. That explains the difference in results.
Chris, I want to thank you for doing this comparison and generating productive conversation. I’m brand new to robotics, but I’m researching inexpensive LIDAR because I have my first project in mind. All of the information on this page and in the comments has been incredibly helpful.
I was wondering if you could upload a more data on the outdoor range of the Sweep (or even RPLIDAR A2) at median motor speeds (around 5 Hz)? Or if you could tell me what motor speeds they can detect car-sized objects at a distance of 15 meters? I don’t need fancy images or graphs, just confirmation I can detect wide objects (4 meters wide) from 15 meters outdoors with at least 3 or 4 rotations per second.
Neither of those can do 15m outdoors. The both max out at about 3-4m
Are you saying even at 2 Hz or 3 Hz both units max out at 3 or 4 m outdoors?
Hii Chris, I have a question like can we use RP lidar or sweep Lidar for weed detection in maize field instead of camera ?
Hi Chris,
Thank you for sharing all these informations. Just one question on the way you are powering the sweep lidar. What kind of batteries are you employing? Because, with a raspberry 3, the max_usb_current=1, it seems that the two 18650 3.7v I’m using are not enough and the lidar
doesn’t start to rotate smoothly.
Thanks,
Davide
I power the Lidar from the car’s power supply. This one works well:
https://www.sunfounder.com/modules/more/power-supply/mb102-breadboard-power-supply-module.html
hello , i have a question about the real weight of this two lidar sensor , the sweep is it 120 grams ?, and what about the rplidar a2?