25 ms·
The robots operate on N ticks per second. You only get one set of robot inputs per tick and can only make one command. The Java code is tickless. During a sing
by dwohnitmok 3y ago
The robots operate on N ticks per second. You only get one set of robot inputs per tick and can only make one command.
The Java code is tickless. During a single tick none of the while conditions will change.
Therefore the while loop will run forever and never allow the tick to finish.
The Lua code yields at the end of any loop iteration allowing the tick to complete. Then whatever is orchestrating the robot on the next tick calls resume on the coroutine allowing the another iteration to continue, this time with new inputs.