It is easy to do robotics only with mecanics.
This interesting vehicle go back each time it detects an obstacle.
How does it works? With inertia, likewise in a car accident, the engine goes forward and inverse rotation.
Watch the video.