On a recent bike ride through the woods near Menlo Park in California, Adam Bry, CEO of a company called Skydio, and his coworkers were joined by a small, nimble drone. As they rode along a dirt track, the drone followed close by, weaving expertly around tree trunks and branches in a series of deft maneuvers.

What’s amazing is that the drone wasn’t piloted by a person, but by Skydio’s technology. It lets an unmanned aerial vehicle (UAV) use several video cameras not only to avoid obstacles but also to navigate at high speeds through busy airspace as expertly as a human pilot.

That kind of autonomy could transform the consumer drone market by making aircraft much harder to crash. It could also make it easier for drones to do tasks autonomously even in busy settings. Skydio, founded last year, has so far raised $25 million in funding in a round led by Andreessen Horowitz and Accel Partners. Bry declined to say when Skydio’s first product would appear or how much it might cost.

The kind of sensing and navigation demonstrated by Skydio’s aircraft is challenging to perform on a cheap and lightweight platform.

“The motivation for the company is giving the thing the agility, attention, and awareness that an expert pilot has,” Bry says. “That’s an extremely challenging thing to do. There’s a lot of context that we bring to bear when we’re flying.”

Flying autonomously is more difficult than driving because the hardware needs to be compact and light, and because even the slightest miscalculation can result in disaster. “There’s essentially no margin for error,” Bry says. “You can’t stop and turn everything off, because if you do that, you crash. In fact, if anything goes wrong on any part of the system, the most likely outcome is that you crash.”

The drone developed by Skydio uses a camera together with vision-processing software that lets the aircraft determine where it is in space, and to identify and avoid obstacles. Bry developed the algorithms that enable this with Abraham Bachrach, who is now Skydio’s chief technology officer, while both were students at MIT. The techniques they came up with made it possible for drones to navigate through unfamiliar indoor spaces safely and for a plane with a two-foot wingspan to weave its way around a busy garage without crashing.

Nick Roy, a professor of robotics who advised Bry and Bachrach at MIT, expects aerial vehicles to become more common for surveillance and inspection tasks. But he adds that reliable autopilot, which Skydio is a significant step toward, is a key missing piece of that picture. “If we want these things to provide all the services people are hoping for in terms of infrastructure inspection, precision agriculture, filming in various ways, that’s going to require autonomy,” Roy says. “It’s going to be really important.”