View Single Post
  #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: 429
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