debug in the final part of the target operation, added obstacle detection and consequent motor stop