Changes between Version 8 and Version 9 of ControlSystems/SoftwareTeam/Training/GettingStarted/RobotFSM1


Ignore:
Timestamp:
Nov 6, 2019, 2:43:52 PM (6 years ago)
Author:
David Albert
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ControlSystems/SoftwareTeam/Training/GettingStarted/RobotFSM1

    v8 v9  
    11You should review the Java [wiki:ControlSystems/SoftwareTeam/Training/GettingStarted/StateMachines1 Basic State Machine] example before exploring this code.
    22
    3 The most basic requirement for scoring points in autonomous mode is usually to drive off the starting position some distance and then stop.  We explored how to do this in the [wiki://ControlSystems/SoftwareTeam/Training/GettingStarted/Autonomous Autonomous] and [wiki://ControlSystems/SoftwareTeam/Training/GettingStarted/ClosedLoopControl Closed Loop Control] examples.  However, to do something interesting (and earn more points), robots usually need to perform a sequence of maneuvers and actions.  There are several ways to do this, but the simplest is with a state machine. 
     3The minimum requirement for scoring points in autonomous mode is usually to drive off the starting position some distance and then stop.  We explored how to do this in the [wiki://ControlSystems/SoftwareTeam/Training/GettingStarted/Autonomous Autonomous] and [wiki://ControlSystems/SoftwareTeam/Training/GettingStarted/ClosedLoopControl Closed Loop Control] examples.  However, to do something interesting (and earn more points), robots usually need to perform a sequence of maneuvers and actions.  There are several ways to do this, but the simplest is with a state machine. 
    44
    55The example below is the full Robot.java program to drive straight for a set distance and then execute a turn.