Spatio-temporal terrain classification for mapping and robot localization