Fixed coding style
Fix camel case
Clean up process_robots
Unify MAX and min macros
Optimize condition in cycle_robot