robot is randomly ‘skipping’ over commands during an autonomous run.
We had to move beyond using the ‘drive base’ for autonomous. We are using individual motor control.
To do so, we set a variable, RT in this case which stands for ‘right turn’.
We then broadcast ‘RT’ which is received by the left wheel motor.
It then does a simple calculation to convert the variable (45 degree turn in this case) to the required # of motor degrees needed.
We then use a small wait statement to give the robot enough time to complete the movement before continuing.
We think it’s not setting the variable in enough time, and since the variable’s initial value is zero, it essentially ‘skips’ the movement command.
put a very small wait after the variable (.05 second) to allow it to fully set
We’ve run this a few hundred times and were ready to burn the robot with fire before we figured this out.
The variable ‘skipped’ seems to float depending if you use a fresh battery or not.
The problem affects more than 1 robot.
Can you guys confirm/comment on this problem?