A goal-oriented autonomous controller for space exploration