Go to Post Joe is a great sport and this was a good moral booster after a grueling weekend. How many opportunities do you get to play William Tell with a Regional WFA Winner? :) - The Lucas [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 Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 18-02-2012, 17:51
bhopewell bhopewell is offline
Registered User
FRC #3224
 
Join Date: Feb 2012
Location: Georgia
Posts: 1
bhopewell is an unknown quantity at this point
Command Based Structure

Our team is fairly new and just recently we have decided to switch to a Command base structure. However, were are having trouble incorporating our Subsystems and Commands with our main class. Are all the methods of a subsystem in that class or should we create Command classes with these methods? If anyone can help us get an understanding of how tie all these classes together it would be greatly appreciated.
Reply With Quote
  #2   Spotlight this post!  
Unread 19-02-2012, 13:00
otherguy's Avatar
otherguy otherguy is offline
sparkE
AKA: James
FRC #2168 (The Aluminum Falcons)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: CT
Posts: 431
otherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to behold
Re: Command Based Structure

There's a good guide to command based using last years robot: http://firstforge.wpi.edu/sf/go/doc1199?nav=1

There's also a bunch of tutorial videos using the sample program (gears bot) provided with the WPILib samples: http://www.youtube.com/user/BradAMiller/

The paradigm in general though
Subsystems characterize the physical components on the robot (drivetrain, shooter, bridge dropper...). The subsystems have the methods which make things move and read sensors. So for a shooter you may have a method which takes speed as a parameter.

Commands stitch the methods which are in the subsystems together to perform a complex action. So for example you may have a command to shoot a ball in the high goal. It might set the speed of your shooter to the right preset, set an angle on a hood, then drive a ball up into the shooter.


I suggest spending some time looking through a completed command based project (like the gearsbot sample which is included with the FRC plugins for Java). Learn by example.

If your team is more familiar with using the simplerobot or iterative robot projects, you might consider focusing on getting that to work since the season is rapidly approaching an end. Stepping too far into the deep end at this point could be dangerous.
__________________
http://team2168.org
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 13:34.

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