|
Using a Gyro without Encoders
Hello. This is the first year we have attempted using gyros, PID, and while loops to navigate in autonomous. I think I have it right and the code does seem to work properly (I'm using a test bed as the robot is currently bagged) but I could use a second opinion to tell me if I'm doing anything wrong.
The routine is supposed to drive straight for a certain time, turn 60 degrees towards the low goal, drive straight for a certain time, and shoot the boulder. It uses a flat sequence structure with while loops in the frames that require iterative functions.
1. Resetting the gyro - Does this require some time or is it instantaneous? Where is the best place to reset this?
2. Reading gyro data - Does gyro data need to be read in each separate while loop?
3. Using wait.vi and loop iterations to keep time - I set the loop to iterate every 10 ms and to terminate when it reaches 500 iterations. I assume this will be 5 seconds. Is there any reason this would not be 5 seconds? Is there a better way to do this?
Any help is appreciated!
|