These are the main functions for the robot.