Added the "event loop" in RobotThread.
Added testing code to RobotMain