View Single Post
  #2   Spotlight this post!  
Unread 12-04-2013, 15:46
joelg236 joelg236 is offline
4334 Retired Mentor & Alumni
AKA: Joel Gallant
no team
Team Role: Mentor
 
Join Date: Dec 2011
Rookie Year: 2012
Location: Calgary
Posts: 733
joelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond repute
Re: Command-Based or Iterative

I'll start off with my reasons to use IterativeRobot instead of Command-Based. Note that this is my opinion only and I completely understand the benefits of both systems.

We use iterative because it lets us do things like this. We can make as many "Robot" classes and switch between them with a simple array. Along with this, we can use this class to call all of the methods within it, and catch any errors. This eliminates a lot of the frustration that comes with NetConsole and Netbeans being needed to debug. Using Iterative also lets us custom tune loops, threads and other things that are kind of "taken care of" in Command-Based. For a lot of people it makes it easier, but I'm a big fan of our custom loop times, delays and fixed-rate execution. Sure we could do it in command-based, but then a lot of the point of command-based is gone.

The part of command-based (well, the idea) we use is Commands. Yes I know that sounds ridiculous, but we have this class that lets us call run() anywhere we need to. We have some basic commands that perform actions on interfaces ("SetteableNumber", "SetteableBoolean", etc.). It lets us not get clogged up in commands that use specific subsystems. (eg. requires())

Iterative also makes Gordian deadly simple to use. Calling new Gordian(stringFromFile).run() in autonomousInit() beats anything else I've ever used.

I also hate the performance of Scheduler. We spent a lot of time dealing with problems I've found rooted in Scheduler not running consistently. (Specifically SmartDashboard buttons)
__________________
All opinions are my own.
Reply With Quote