Robots and Finite-State Machines
By Everett F. Carter, Jr.
Dr. Dobb's Journal February 1997
<B>(a)</B> STATE-MACHINE PROXIMITY APPEND-STATE IR_SCAN APPEND-STATE LEFT_IR APPEND-STATE RIGHT_IR APPEND-STATE BOTH_IR APPEND-STATE END_IR <B>(b)</B> IN-STATE IR_SCAN CONDITION BOTH_IR? CAUSES PROXIMITY_VEC SET_REVERSE ARBITRATE THEN-STATE BOTH_IR TO-HAPPEN <B>(c)</B> MACHINE-CHAIN ROBOT SENSORS WALKER CONTACT PROXIMITY EXPLORE END-MACHINE-CHAIN <B>(d)</B> WALK_FORWARD SET-STATE IR_SCAN SET-STATE BUMP_SCAN SET-STATE IDLE SET-STATE IDLE_MOTION SET-STATE
Example 1: (a) The PROXIMITY machine; (b) setting up the response of the PROXIMITY machine; (c) linking state machines into a single list of machines, which makes up a composite-state machine; (d) defining the initial state of each state machine.
Copyright © 1997, Dr. Dobb's Journal