Go to Post We are making this up as we go along - please don't confuse us by telling us the way that it really should be done. - dlavery [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
View Poll Results: Command Based or Iterative?
Command-Based 17 51.52%
Iterative 14 42.42%
Other (Custom RobotBase, etc.) 2 6.06%
Voters: 33. You may not vote on this poll

Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 12-04-2013, 15:29
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
Command-Based or Iterative

Which one do you use? Yes, I'm aware that Command-Based uses IterativeRobot, but I'm more referring to whether your team uses Command-Based or not.

Please feel free to explain why too, to help teams that don't know which one to go with.
__________________
All opinions are my own.
Reply With Quote
  #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
  #3   Spotlight this post!  
Unread 12-04-2013, 16:19
MikeE's Avatar
MikeE MikeE is offline
Wrecking nice beaches since 1990
no team (Volunteer)
Team Role: Engineer
 
Join Date: Nov 2008
Rookie Year: 2008
Location: New England -> Alaska
Posts: 381
MikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond repute
Re: Command-Based or Iterative

We use command-based because it provides a framework with some degree of abstraction which is also fairly well documented and supported.
Our software team usually consists of 1-2 students plus me, and I'd rather act as a mentor than a programmer. My job is to be a safety net, giving the students a sense of confidence so they can try to solve problems that they may not attempt if the success of the season was solely on their shoulders.
If we were creating much more sophisticated robots then I see the advantages of a bespoke framework, but command-based provides a good sandbox for learning about OO-design, modularity and maintainability.
Reply With Quote
  #4   Spotlight this post!  
Unread 27-05-2013, 22:57
Cel Skeggs Cel Skeggs is offline
Robot Software Manager Alumnus
AKA: Previously known as Colby
FRC #1540 (The Flaming Chickens)
Team Role: Alumni
 
Join Date: Feb 2013
Rookie Year: 2009
Location: Portland, Oregon, USA
Posts: 107
Cel Skeggs is a glorious beacon of lightCel Skeggs is a glorious beacon of lightCel Skeggs is a glorious beacon of lightCel Skeggs is a glorious beacon of lightCel Skeggs is a glorious beacon of lightCel Skeggs is a glorious beacon of light
Re: Command-Based or Iterative

We use IterativeRobot. This is mostly because we switched to Java last year (so we've used it for two years) and it worked well enough for us both years.
I see the Command-Based framework as writing a large amount of code for you, which makes it much harder to debug when a program doesn't work.
We also have a Java class being taught separately at our school, so we can require that all Software students are taking this class or have equivalent experience, so that we don't need to worry about teaching anyone how to program.
We haven't actually programmed our robot using the Command-Based framework yet, but if we're going to use a complex framework, we'd rather write the framework ourselves during the preseason (and release it, of course), so that we have someone on our team who knows how the framework works and how to extend it.
__________________
Software manager alumnus. Developer of the CCRE, a powerful robot code framework based on dataflow and composibility.
Refer to as she/her/hers. Years of FRC: 2012, 2013, 2014, 2015, 2016. FLL for a few years beforehand.
Team 1540: The Flaming Chickens | Portland, Oregon | Twitter | Facebook
Reply With Quote
  #5   Spotlight this post!  
Unread 28-05-2013, 11:27
connor.worley's Avatar
connor.worley connor.worley is offline
Registered User
FRC #0973 (Greybots)
Team Role: Mentor
 
Join Date: Mar 2011
Rookie Year: 2010
Location: Berkeley/San Diego
Posts: 601
connor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond repute
Re: Command-Based or Iterative

We use IterativeRobot, C++
__________________
Team 973 (2016-???)
Team 5499 (2015-2016)
Team 254 (2014-2015)

Team 1538 (2011-2014)
2014 Driver (25W 17L 1T)
日本語でOK
Reply With Quote
  #6   Spotlight this post!  
Unread 28-05-2013, 12:26
Jon Stratis's Avatar
Jon Stratis Jon Stratis is online now
Electrical/Programming Mentor
FRC #2177 (The Robettes)
Team Role: Mentor
 
Join Date: Feb 2007
Rookie Year: 2006
Location: Minnesota
Posts: 3,738
Jon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond repute
Re: Command-Based or Iterative

From what I've seen, I think command-based is easier to use for "simple" stuff. Being able to use command groups, having the built in sequential/parallel functions makes it pretty simple for teams to get fairly complex behavior from their machines.

That said, the implementation of command-based, command groups, and the like does make doing some stuff harder...

I mentioned it in another thread a while ago, but to reiterate... our climbing sequence was really easy to create as a command-based sequence - each step followed the next, and we ended up at the top of the pyramid. However, we encountered some difficulties adding more complex behavior to the sequence. For example, how do we tell it to stop the sequence halfway through and restart? How do we tell it to back up one step? In the end, we determined that adding these behaviors was something we didn't have time to do (including testing to make sure they worked as intended with no side-effects!). As a result, there were a couple of matches this season where we were unable to successfully climb.

Now, if we had set this up iteratively, it would have been a little harder initially, as we would have had to create the sequential/parallel structure we used, using internal variables and conditionals. However, it would have been very easy for us to then manipulate those variables to adjust our position in the sequence.
__________________
2007 - Present: Mentor, 2177 The Robettes
LRI: North Star 2012-2016; Lake Superior 2013-2014; MN State Tournament 2013-2014, 2016; Galileo 2016; Iowa 2017
2015: North Star Regional Volunteer of the Year
2016: Lake Superior WFFA
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 09:59.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi