Lidar: Coming Soon at a Price You Can Afford (part 1)

Google’s automated vehicles are instantly identifiable by the rotating lidar unit mounted on their roofs, and most other automated driving research vehicles are also using lidar, either in similar roof mounted systems (e.g., Bosch), or in multiple units, each with less than a 360 degree field of view (e.g., Carnegie Mellon). These are very powerful, 3D scanning sensors, but they don’t come cheap. According to reports, Google uses a sensor from Velodyne that costs approximately $75,000. Some of those with less than a 360 degree scan can be had at less than half that price, but you need several of them. I don’t think any hobbyists (unless they are in the 1%) are going to run out to get one to use in their robotics project. A good video showing the processed information derived from the Google car is viewable here: http://youtu.be/_EMAoiqLq9Y.

Until just a few years ago, that was about it. If you wanted to experiment with a lidar unit, you needed to shell out over $10,000. But that’s changed, and it’s starting to change even faster.

 Lidar on the Cheap

Lidar generally works by sending out a laser signal and measuring the time it takes to get a reflected signal back from an object. Like radar, you get a range and direction. this distinguishes lidar from laser rangefinders, which determine distance only (and at least one vendor,  apparently wanting to exploit the interest in lidar, advertises their rangefinder as a lidar unit). Lidars are not mass-produced, and sophisticated electronics that handle are precise at processing extremely tight time frames (the time of flight difference for a radar return from 1 meter versus 10 meters is EXTREMELY small). Very precise mechanical parts are typically required.

 The Neato XV-11

However, in 2010, Neato Robotics introduced a new robotic vacuum cleaner that got robotics hobbyists very excited. Not because they don’t like dirty floors, but because it incorporated a lidar unit as part of its navigation system. And the entire vacuum cleaner, lidar included, cost less than $400. Hobbyists got right to work hacking the lidar unit, and, while the manufacturer doesn’t sell just the lidar units, they are available on ebay and other sources for under $100 each! The interface has been reverse engineered and documented on many websites, including the XV11hacking wiki. Interface code for ROS and other platforms, e.g., arduino, have also been developed. At least one vendor, Get Surreal, sells a controller board for this unit to simplify use.

Part of the cost reduction comes from using a different approach for ranging. Rather than using time of flight for the lidar signal, the Neato unit uses  triangulation, with a laser diode emitter and an imager receiver. This eliminates the need for extremely time-precise electronics.  A technical paper on their lidar, A Low-Cost Laser Distance Sensor, is available on the web.

Obviously these units don’t compare with a $75,000 unit. Their range is on the order of 6 meters (nice for indoor or slow speed operation, but hardly something you can build an autonomous passenger vehicle around). The resolution is lower, and they produce a 2D scan, not a 3D scan. A nice, short, video demo of the type of performance you might expect is at http://youtu.be/WkW55b-WQx4. One could mount one on a tilt platform and produce a 3D point cloud from multiple scans at different angles of elevation, but it would be slower. This video shows that approach, albeit for a different lidar unit.

Neato Robotics XV-11 lidar with top removed

the XV-11 Unit, with the top removed. (photo source: Sparkfun)

I’ve got an XV-11 unit and controller board on order, and will report about it in part 3 of this series (which could be awhile in coming).

 RPLIDAR

The XV-11 was the first low-cost lidar unit for hobbyists, but new options at a variety of price ranges are coming available. Robopeak has introduced what appears to be a similar unit to the XV-11, the RP developed and designed for hobbyists and researchers.  Priced at $399, it includes, according to reviewers who have purchased the product, good sample drivers for several platforms, including ROS and arduinos, as well as a full SDK and good documentation (something that won’t be found when buying an XV-11 unit on ebay). For many, the greater ease of use and reduced time would be worth the price difference from an XV-11.

RPLIDAR Unit

RPLIDAR Unit (photo source: DFRobot)

ADDED: LIDAR-Lite

A number of low-priced laser range-finders advertise themselves as lidars, but with this exception, I’ve looked at only systems that scan, either in 2D or 3D as lidars. While a range-finder (1D), the LIDAR-Lite has some very interesting advertised capabilities at a low price point, which might make it worth exploring putting it on a rotating platform as a lidar unit. Rather than directly measuring time of flight, as more expensive units do, or using triangulation like the NX-2, it sends out a coded waveform and, if I understand what they are saying on their website, uses signal processing to look at the shift coming back as compared with an identical reference signal.

The unit is very small (21 X 48.3 X 35.5 mm) along with a similarly sized single PCB board and costs $89. Keep in mind this is for a range-finder. You’d still have to have a precision panning platform to use it as the core of a full lidar. What makes this unit interesting is that with the $89 laser version, with optics, they claim a maximum range of 30-60 meters, and that it works outdoors in sunlight, which is, as far as I can tell, unprecedented for such a low-cost unit. 

Deeper Pockets

Part 2 of this series will discuss some of what’s available for budgets of $1,000 – $10,000, including the recently announced Velodyne Puck.

Velodyne "Puck" 3D Scanning lidar

Velodyne “Puck” 3D Scanning lidar

Stanford’s Machine Learning Course @ Coursera

Stanford’s Machine Learning course, taught by Dr. Andrew Ng was one of the courses that started the MOOC enthusiasm, and having now completed it, I can see why. I found it fascinating, mostly just the right of challenge, and a class I’ve gotten a lot out of. 

Machine Learning is basically having the computer figure our part of how to solve the problem, rather than explicitly programming in all the parameters. So, for example, you can feed parameters about items into the computer and tell it to group the items into a specified number of clusters and using, for example, k-means clustering, it will find the way to group them into the most distinct groups. Or you can use a neural network to identify hand-written digits by feeding the network training examples and the correct results, without ever trying to explicitly program how to distinguish a 1 from a 7 from a 4. 

Example classification results using logistic regression in Octave

Example classification results using logistic regression in Octave

The course is focused on machine learning algorithms, and seems to cover most of the basics, with the exception of ensemble methods. It is not a class in big data, but it is these same analytic approaches, adopted to handle large data sets, that are used in Big Data applications. Part of one of the last week’s videos provides a bit of an introduction to the issue that have to be addressed when applying the techniques to big data.

The class, like other MOOC’s I’ve taken, is light on theory to cut down on the difficulty and time required for the class. However this class provided some theory without proofs so that you gained an understanding of the topic and it wasn’t just a cookbook.  At the same time, it covered practical recommendations and guidance for putting what you learned in to use.  I really liked the balance. There are video lectures, typically with one or two questions in each video that aren’t scored, they just break up watching the video and provide a self-check that you are following the material. Then there are weekly homework problems typically 5, with some having multiple parts. They are multiple choice with most having multiple answers to provide (e.g., “check which of the following statements are true.”). In addition, there are hands-on programming assignments each week using Octave, which is a free programming language.  Octave has almost identical syntax to Matlab and you can use Matlab as an alternative. Octave uses a command line interface, however, rather than Matlab’s notebook approach.

With one exception, the assignments weren’t too hard, but took work.  The neural networks assignment about half-way through the course really took a lot of work to complete. I was worried that the assignments might get progressively harder, but they didn’t. 

The topics covered in the course are:

  1. Introduction to Machine Learning. Univariate linear regression. (Optional: Linear algebra review.)
  2. Multivariate linear regression. Practical aspects of implementation. Octave tutorial.
  3. Logistic regression, One-vs-all classification, Regularization.
  4. Neural Networks.
  5. Practical advice for applying learning algorithms: How to develop, debugging, feature/model design, setting up experiment structure.
  6. Support Vector Machines (SVMs) and the intuition behind them.
  7. Unsupervised learning: clustering and dimensionality reduction.
  8. Anomaly detection.
  9. Recommender systems.
  10. Large-scale machine learning. An example of an application of machine learning.

If you’ve any interest in the topic and are looking to learn, I highly recommend this course. It’s inspired me to continue to learn through the machine learning challenges at Kaggle. I’ve switched over from using Octave to the Scikit-learn package in python. All I can say about Scikit-learn in this article is WOW! What a powerful, convenient, and, especially given that’s it’s an open source project, amazingly well-documented. I’ll have more about Kaggle and Scikit-learn in a later post.

My First Maker Faire

My wife and son and I went up to New York City last weekend to attend the World Maker Faire.  It was our first.  It was very impressive to see all the makers. A journalist described Maker Faire as being a family-friendly combination of the Consumer Electronics Show and Burning Man.  I’ve never been to either, but from what I’ve read, that sounds like it captures some of the flavor. The CES-like portion, however, is more equipment for Makers, not finished electronics products.  The exhibits and booths range from high school robotics teams to corporate exhibits (e.g., Arduino), with a very broad range, from textiles to Purina’s DIYCat tent..

Eepy Bird getting ready for their next Coke and Mentos fountain show

Eepy Bird getting ready for their next Coke and Mentos fountain show

Click the photo to view a small photo set from the Faire. Adafruit has a much larger gallery of pictures posted here.

In addition to the exhibits, there are learning areas, including Learn to Solder, lockpicking classes, and build an air-powered rocket for kids, as well as short 20 minute or so talks at multiple stages throughout both days, and some large exhibits such as the human-sized mousetrap show and Eepy-Bird’s Coke and Mentos fountains extravaganza.

The presentations I went to included Multirotors 101, Shrinking the Size of Your Arduino Projects, Hacking the Unhackable: How We Can Make the Entire Word Interactive, and Getting Started with the Arduino YUN.  My son attended talks including ones on the Rasberry Pi and on how the Maker Faire is, in its own way, continuing the traditions of Worlds Fares of old.  The Shrinking the Size of Your Arduino project was about a product I hadn’t seen before, the TinyDuino.  This is an Arduino-compatible board the size of a quarter, WITH it’s own set of shields!  It’s the latter that really distinguishes it from other tiny Arduino compabitle boards.

It was definitly a fun weekend, with stuff for the whole family.  I’m very glad we drove up to New York and spent the weekend. Now having attended the World Maker Faire, I don’t feel the need to make it a must-do annual trip, but I definitely want to return repeatedly . We went for a day and a half, but for the future, will probably make it just a one day event.