Robot control code which polls the robot server with sensor data and receives pending commands.