added collision detection to robot