Design and Implementation of a Control and Monitoring Scheme for Spacecraft Obstacle Avoidance