Autonomous Problems

I know exactly what I want for our team in regards to autonomous, but sadly I have no idea where to even begin.

Questions

  1. Whats the difference between independent and iterative.
  2. What of the basic code, provided upon starting a new project, is needed.
  3. Where do I put my code? (RefNum Gets, Joystick Gets, Solenoid sets, ect.)
  4. How do I run certain motors for specified time periods. (ex. Run Left & Right motors 1 second)

I feel like other teams have been asking themselves these questions too, but no one has posted them (I’ve searched a few times).

This post could be used as a database so if you have any questions or answers post them here (or, and I know that this might be a huge undertaking, a new sub-forum, under programming, dedicated to autonomous)

1.independent is an autonomous that runs once that can be used for almost anything in autonomous(start in independent) iterative runs over and over for extremely short tasks
2.dont touch anything with a light blue top on the subvi or anything in that flat sequence in the top left corner everything else can be taken out for your code
3.in the main while loop
4.stacked or flat sequence is used for timed tasks put the code in steps in each part of the loop if you put a wait in their it will run the section for that amount of time(in miliseconds)

The framework supports several ways of doing autonomous. This was mostly for compatibility with how things were done on the old system and to match the capabilities across the languages. I would definitely recommend opening the Autonomous Independent VI and examining what is in its diagram. It is started at the beginning of autonomous, and either runs to completion or is aborted at the end of the period.

You can Get Refnums at any time, such as at the beginning of the autonomous, use them, and unless something in teleop is used very differently, you do not need to worry about closing or anything else until Finish.

You typically set the Drive values based on how you would imagine moving the joystick. You use time, distance, or another sensor feedback to determine how to adjust your path.

By default, the LV template runs the vision code independently, including during autonomous. This means you can simply read the global variable about targets. You can use this to time kicks, turn the robot, etc.

Greg McKaskle