The US space agency's Mars 2020 rover will collect rock samples to be returned to Earth for analysis by a future mission.