When Roomba knocks into something, its bumper retracts, activating mechanical object sensors that tell Roomba it has encountered an obstacle. It then performs (and repeats) the sequential actions of backing up, rotating and moving forward until it finds a clear path.