View Single Post
  #21   Spotlight this post!  
Unread 22-08-2014, 13:40
MamaSpoldi's Avatar
MamaSpoldi MamaSpoldi is offline
Programming Mentor
AKA: Laura Spoldi
FRC #0230 (Gaelhawks)
Team Role: Engineer
 
Join Date: Jan 2009
Rookie Year: 2007
Location: Shelton, CT
Posts: 305
MamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant future
Re: What base class do you use when programming?

We have been using SimpleRobot base class since 2009 when C++ and the cRIO became available. Because it gives us full control and flexibility in how we handle the robot operations. We implement an architecture similar to the CommandBase but of our own design.

We have classes representing the main robot systems which define an interface to:
[1] support the various tasks that will be requested by the operator and
[2] provide any information that will be needed by other classes, as well as
[3] a service function which is called each time through the main loop of teleop and autonomous to perform multi-step operations. [Note that none of the interface functions are allowed to perform operations which take significant processing time; they simply set a flag to start an operation or turn on a mode and return.]

Our TeleOp and Autonomous functions are basically loops which maintain the loop time (required for PID loops and other control systems) and make use of the interface defined by each class to facilitate the operation required... either based on an operator request (like pushing a button on the joystick) or based on the steps defined for the currently selected autonomous mode. Reusing the same class interface functions to perform operations in both modes allows our autonomous to come together very quickly and reliably after the testing is done for teleop.
__________________