Added the subroutine that stops the robot.