Snatching a piece of asteroid Bennu was supposed to be — well, not easy, but certainly manageable: scope out the space rock, find some flat spots, swoop down at one, come back home.

But when NASA's OSIRIS-REx spacecraft arrived at Bennu in December 2018, the scientists and engineers on the mission realized that the asteroid was much, much rockier than they had expected. Like, boulders everywhere. Boulders as big as buildings. Boulders you do not want your fancy spacecraft to bang into.

OSIRIS-REx, which launched in 2016, has a lidar navigation system that would have allowed the spacecraft to recognize obstacles based on the echoes of a light beam the probe produced. But once the mission revealed Bennu's surface in all its rocky glory, scientists and engineers decided it was time to come up with something new.

Related: OSIRIS-REx: NASA's asteroid sample-return mission in pictures

An artist's depiction of how OSIRIS-REx will use Natural Feature Tracking to compare real-time images of the asteroid's surface to a bank of previous photos in order to steer itself to the sampling site. (Image credit: NASA/Goddard/University of Arizona)

"Boulders as big as buildings. Boulders you do not want your fancy spacecraft to bang into."

The result is a process the team is calling Natural Feature Tracking, which relies on the massive image database that OSIRIS-REx has built up in the months since it arrived at Bennu and began taking images of the space rock from every angle possible.

As the probe embarks on a sampling attempt, it will begin taking still more such photos, which its computer system will automatically compare to the archived images showing the path it should be following. If those views don't line up, the spacecraft will automatically retreat for another attempt, rather than risk damage on the perilous surface.

If the system works as planned, it should boost OSIRIS-REx's accuracy: Whereas its lidar system was only designed for accuracy within a site 164 feet (50 meters) across, Natural Feature Tracking will be accurate enough to tackle a target area just 10% that size, NASA officials said in a statement.

Scientists on the OSIRIS-REx mission have selected two target sampling sites on Bennu, dubbed Nightingale and Osprey. The mission's window for sampling opens in late August in order to ensure that the spacecraft can leave Bennu next year. If all goes well, scientists should have their space rock on Earth in 2023.

Email Meghan Bartels at mbartels@space.com or follow her @meghanbartels. Follow us on Twitter @Spacedotcom and on Facebook.