Scientists at the Massachusetts Institute of Technology have created a drone that can detect and dodge obstacles.

The MIT Computer Science and Artificial Intelligence Lab (CSAIL) research team developed a novel obstacle-detection system that allows a drone to dart through a tree-filled field at over 30 miles per hour.

"Everyone is building drones these days, but nobody knows how to get them to stop running into things," said CSAIL PhD student Andrew Barry. "Sensors like lidar are too heavy to put on small aircraft, and creating maps of the environment in advance isn't practical. If we want drones that can fly quickly and navigate in the real world, we need better, faster algorithms."

The new stereo-vision algorithm runs an impressive 20 times faster than any existing software for obstacle detection, and allows the drone to build a full map of its surroundings in real-time. The software operates at 120 frames per second and extracts depth information at a speed of 8.3 milliseconds per frame.

Most of today's obstacle-detection algorithms take images from cameras and search through the depth-field at multiple distances to determine whether or not objects exist in the drone's path. The problem with this technique is that it is computationally intensive, meaning the drone cannot fly faster than about five miles per hour without being equipped with specialized processing hardware. The researchers realized that at the speeds the new drone travels, the world tends to not change very much between frames. This realization allowed them to compute only a small subset of measurements at about 10 meters away.

"You don't have to know about anything that's closer or further than that," Barry said. "As you fly, you push that 10-meter horizon forward, and, as long as your first 10 meters are clear, you can build a full map of the world around you."

The new software can quickly recover missing depth information by integrating results from previous distances, which helps to remedy some of the limits associated with the method.

"Our current approach results in occasional incorrect estimates known as 'drift,'" Barry said. "As hardware advances allow for more complex computation, we will be able to search at multiple depths and therefore check and correct our estimates. This lets us make our algorithms more aggressive, even in environments with larger numbers of obstacles."

The new software is open source and is available online.

WATCH: