From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

FIRST Robotics Competition Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Autonomous independent vs iterative

I note in the ;Using the FRC Framework' that the indepent vi is recommended over the iterative.  Why?  Why have the iterative framework available?

0 Kudos
Message 1 of 2
(7,339 Views)

In my mind, the only advantage that the iterative has is that it is similar to the telop code and similar to what teams have programmed in the past. You are basically required to use a state machine (or in our case last year, several) to keep track of everything.

One of the most common questions on chiefdelphi in years past is "why does my robot stop working when I do while (arm < value)". That's because you can't put a blocking call in an iterative routine like previous years code. There's nothing stopping you from doing that with the independent code. It's running as a separate task, so you can purposely create blocking calls to help regulate the flow of the program.

We're developing our autonomous code using the independent template. We're fashioning it like NXT bricks, and are making ample use of while loops to do it. In general, I think this is the simpler way to code, both for people developing the "bricks" and for the people using them. As a beta team, we'll be releasing the code once it's more tested.

If you just want to reimplement last year's code in LabVIEW, then iterative should be your choice. However, I think most people will eventually want to move to independent.

Message was edited by: sciencewhiz

0 Kudos
Message 2 of 2
(2,411 Views)