Go to Post The kit of parts is a hundred yards of denim. - StuartV. [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

 
Reply
Thread Tools Rating: Thread Rating: 3 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 01-29-2013, 11:35 PM
heya101 heya101 is offline
Registered User
FRC #3699
 
Join Date: Mar 2011
Location: Minnesota
Posts: 11
heya101 is an unknown quantity at this point
Command Based vs Simple Robot

I was having this discussion with someone else on our programming team deciding on which direction we should head for our design for programming this year in java.

He would like to use the template based on SimpleRobot (From what I can tell this is the most editable option??) and I kinda wanted to try Command because of how for me personally it seems a lot more organized.

His argument was that he thought Command was redundant if we would only use 4 subsystems (Drive-train, shooter, elevator, intake) and it would make more sense to stay with his design path since he could change it in a much more freely.

My question is what are the pros and cons between using the two options (Which one might be more powerful)? From what I've searched simple is a more open option while command is much more rigid and structured.
Reply With Quote
  #2   Spotlight this post!  
Unread 01-29-2013, 11:54 PM
jesusrambo jesusrambo is offline
Self-Proclaimed Programmer Messiah
AKA: JD Russo
FRC #2035 (Robo Rockin' Bots)
Team Role: Programmer
 
Join Date: Feb 2012
Rookie Year: 2010
Location: Carmel, CA
Posts: 114
jesusrambo is an unknown quantity at this point
Re: Command Based vs Simple Robot

I'd recommend using commandbase. Simple is a lot less flexible, and has much less compartmentalization of all your code. Command based gives you the benefit of the structure, some more flexibility with commands/subsystems, and the biggest benefit -- you can reuse your code the next year with command based, since it's all so compartmentalized you can just keep and tweak the parts you're reusing.
Reply With Quote
  #3   Spotlight this post!  
Unread 01-30-2013, 12:05 AM
jfitz0807 jfitz0807 is offline
Registered User
FRC #2877 (Ligerbots)
Team Role: Parent
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Newton, MA
Posts: 65
jfitz0807 is an unknown quantity at this point
I'm new to using java for the robot this year. When people talk about a "command based" robot are they referring to the IterativeRobot or is there another extension?
Reply With Quote
  #4   Spotlight this post!  
Unread 01-30-2013, 12:18 AM
BigJ BigJ is offline
Registered User
AKA: Josh P.
FRC #1675 (Ultimate Protection Squad)
Team Role: Engineer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Milwaukee, WI
Posts: 943
BigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond repute
Re: Command Based vs Simple Robot

Quote:
Originally Posted by jfitz0807 View Post
I'm new to using java for the robot this year. When people talk about a "command based" robot are they referring to the IterativeRobot or is there another extension?
"Command-based" is a seperate architectural template from Simple and Iterative.

Check it out here. (Java uses the same stuff basically)
Reply With Quote
  #5   Spotlight this post!  
Unread 01-30-2013, 08:14 AM
heya101 heya101 is offline
Registered User
FRC #3699
 
Join Date: Mar 2011
Location: Minnesota
Posts: 11
heya101 is an unknown quantity at this point
Re: Command Based vs Simple Robot

Do you think with four subsystems (DriveTrain, Intake, Elevator, and Shooter) Command would be redundant? Also is it possible to integrate, say 1 subsystem and command, into a simpleRobot template?
Reply With Quote
  #6   Spotlight this post!  
Unread 01-30-2013, 10:10 AM
gixxy's Avatar
gixxy gixxy is offline
Programming and Arduino Mentor
AKA: Gustave Michel III
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Nov 2011
Rookie Year: 2012
Location: Ruston, LA
Posts: 207
gixxy is on a distinguished road
Re: Command Based vs Simple Robot

I was against the Command Based Template at the beginning for the same reason. However looking back on it, the time saved and time using the CommandBased Structure was great. It is a great structure well built and simple to use once you know some basic Java.

The programming team is always the one on crunch time at the end when the physical design is done. Unless you are able to really get a format/structure together on your own (Probably would have had to been done offseason) then go ahead with it, otherwise I would highly stress the Command Based Structure.
__________________
Programmer - A creature known for converting Caffeine into Code.
Studying Computer Science @ Louisiana Tech University
Associate Consultant @ Fenway Group

2012-13: 3946 - Head of Programming, Electrical and Web
2014 - 3468 - Programming Mentor
2015 - Present - Lurker
Reply With Quote
  #7   Spotlight this post!  
Unread 01-30-2013, 12:23 PM
jwiederspan jwiederspan is offline
Registered User
FRC #3663
 
Join Date: Oct 2012
Location: Washington
Posts: 5
jwiederspan is an unknown quantity at this point
Re: Command Based vs Simple Robot

We moved to Command-based this season, and it is a little more difficult for the new programmers to get used to but MUCH better for a team to work on and much more flexible than our old code.
1) Having subsystems (and commands) in separate files made it much easier to separate out the work. We agreed on the public interfaces and then each person could tweak and improve behind the scenes as needed;
2) The subsystems become somewhat modular, so you will probably find yourself each year picking and choosing from those used in previous years and they will be easier to incorporate;
3) It is much more flexible because your commands compete individually for resources instead of having the entire code base need to know what state things are currently in; and
4) It is better programming - since our goal is to get the kids excited about programming, telling them that they are using programming concepts that don't get introduced until the second year of computer science classes at most colleges usually gets them very excited.
Reply With Quote
  #8   Spotlight this post!  
Unread 01-30-2013, 12:39 PM
omalleyj omalleyj is offline
Registered User
AKA: Jim O'Malley
FRC #1279 (Cold Fusion)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2008
Location: New Jersey
Posts: 132
omalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to behold
Re: Command Based vs Simple Robot

Quote:
Originally Posted by jesusrambo View Post
I'd recommend using commandbase. Simple is a lot less flexible, and has much less compartmentalization of all your code. Command based gives you the benefit of the structure, some more flexibility with commands/subsystems, and the biggest benefit -- you can reuse your code the next year with command based, since it's all so compartmentalized you can just keep and tweak the parts you're reusing.
I feel the command based approach is helpful for teams that do not have seasoned Java help, but most of the comments above are incorrect or misleading.

Flexible means you can do something in one that you can't do in the other. I am hard put to think of anything you cannot do in both.

Command enforces (or at least coerces) good object oriented practices, and if you were to throw all your code into the SimpleRobot class it (Command) would be more compartmentalized, but you should not do that. If you break up each subsystem to be its own class (as you should) everything is nicely encapsulated and modular.

This year we have classes for the drivetrain, shooter, climber, camera, utilities, and an interface for constants. Last year we had the same except for climber, and could have reused nearly everything. We don't because different students code different classes and do it from scratch, for the learning experience.

So by all means use command based programming, but not for the reasons above. It is helpful for those with limited resources, but for those who can afford it, it is probably more helpful to learn the techniques that underly it by coding it themselves.

Last edited by omalleyj : 01-30-2013 at 12:49 PM. Reason: clarify pronoun use
Reply With Quote
  #9   Spotlight this post!  
Unread 01-31-2013, 02:08 PM
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,547
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Command Based vs Simple Robot

Quote:
Originally Posted by heya101 View Post
His argument was that he thought Command was redundant if we would only use 4 subsystems (Drive-train, shooter, elevator, intake) and it would make more sense to stay with his design path since he could change it in a much more freely.
I would encourage you to think of the number of commands, rather then the number of subsystems when determining the complexity of your robot. Subsystems are a nice way to keep like hardware encapsulated together, but aren't really that important.
Reply With Quote
  #10   Spotlight this post!  
Unread 02-01-2013, 09:34 AM
java4first java4first is offline
(Java) Programming Mentor
AKA: Stu
FRC #0501 (Power Knights)
Team Role: Mentor
 
Join Date: Nov 2010
Rookie Year: 2011
Location: Goffstown, NH
Posts: 56
java4first is an unknown quantity at this point
Re: Command Based vs Simple Robot

I agree completely with "omalleyj" ... we had a session with WPI at the end of the summer for several programming mentors from different teams in our area, and I think the general consensus was that this was great for rookie teams and teams without strong programming mentors - but it didn't seem that much different from what we were already doing (e.g., we already had 'subsystems' with well defined interfaces - we just weren't calling them that). But, as with all software - there are lots of ways to do the same thing, and you should go with what works for you.
Reply With Quote
  #11   Spotlight this post!  
Unread 02-01-2013, 05:22 PM
jesusrambo jesusrambo is offline
Self-Proclaimed Programmer Messiah
AKA: JD Russo
FRC #2035 (Robo Rockin' Bots)
Team Role: Programmer
 
Join Date: Feb 2012
Rookie Year: 2010
Location: Carmel, CA
Posts: 114
jesusrambo is an unknown quantity at this point
Re: Command Based vs Simple Robot

Quote:
Originally Posted by java4first View Post
I agree completely with "omalleyj" ... we had a session with WPI at the end of the summer for several programming mentors from different teams in our area, and I think the general consensus was that this was great for rookie teams and teams without strong programming mentors - but it didn't seem that much different from what we were already doing (e.g., we already had 'subsystems' with well defined interfaces - we just weren't calling them that). But, as with all software - there are lots of ways to do the same thing, and you should go with what works for you.
Why would you redo the entire structure by yourself then, if it's the same thing? We have two PhDs helping mentor the programming department, and they're still fans of using it over simple or iterative.
Reply With Quote
  #12   Spotlight this post!  
Unread 02-01-2013, 06:21 PM
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 7,997
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Command Based vs Simple Robot

Quote:
Originally Posted by jesusrambo View Post
We have two PhDs helping mentor the programming department, and they're still fans of using it over simple or iterative.
What are their names? I'd like to read their dissertations.


Reply With Quote
  #13   Spotlight this post!  
Unread 02-01-2013, 06:23 PM
jesusrambo jesusrambo is offline
Self-Proclaimed Programmer Messiah
AKA: JD Russo
FRC #2035 (Robo Rockin' Bots)
Team Role: Programmer
 
Join Date: Feb 2012
Rookie Year: 2010
Location: Carmel, CA
Posts: 114
jesusrambo is an unknown quantity at this point
Re: Command Based vs Simple Robot

Quote:
Originally Posted by Ether View Post
What are their names? I'd like to read their dissertations.


Sure, I'll PM it to you.
Reply With Quote
  #14   Spotlight this post!  
Unread 02-01-2013, 06:23 PM
omalleyj omalleyj is offline
Registered User
AKA: Jim O'Malley
FRC #1279 (Cold Fusion)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2008
Location: New Jersey
Posts: 132
omalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to behold
Re: Command Based vs Simple Robot

Quote:
Originally Posted by jesusrambo View Post
Why would you redo the entire structure by yourself then, if it's the same thing? We have two PhDs helping mentor the programming department, and they're still fans of using it over simple or iterative.
Use what you feel adds value to your program. I feel, and it sounds like java4first feels (don't want to put words in his mouth), that building from the ground up adds value to our program.

Its like doing web design, no one really 'needs' to write pages of html anymore, but there are interesting things to be learned by doing so.

Use what works for you, but if you are going to offer guidance to others, be accurate in your assessment of the choices.
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 07:47 AM.

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