Here's a summary of the Autonomous Development Kit:
Quote:
|
Originally Posted by lineskier
The idea is each robot registers an autonmous or operator controller.
This controller then determines what the current maneuver is and notifies the mechanisms of a change.
The controller also registers the current maneuver with the robot.
The mechanisms refer to the robot for the current maneuver.
the mechanisms the send a response when they complete or fail a given task.
each mechanism should be able to work independently of the other mechanisms, so your examples of maneuvers are drive maneuvers, not robot maneuvers.
How I implemented it is all mechanisms recieve a drive forward command (which is really drive forward and shoot).
think of it as a phase 1 command (phase 0 being init)
when the drive recieves that command it drives forward infinitely
when the shooter recieves the command it shoots if the ball breaks the ir beam
when it shoots it responds to the controller with a pass.
the controller keeps looping this until it has seen N number of passes
the the passes >= N it has succesfully completed that maneneuver (shooting N balls) and can move on to its next
maneuver.
As the controller handles the maneuvers, if it changes the current maneuver it overrides it for every mechanism, however a mechanism itself can choose to ignore a given maneuver command.
|