Module move :: Class MoveToFixedPoint
[frames] | no frames]

Class MoveToFixedPoint

sm.SM --+
        |
       MoveToFixedPoint

State machine representing robot behavior that drives to a specified point. Inputs are instances of io.SensorInput; outputs are instances of io.Action. Robot first rotates toward goal, then moves straight. It will correct its rotation if necessary.

Instance Methods
 
__init__(self, goalPoint, maxVel=maxVel)
 
getNextValues(self, state, inp)
Default version of this method.
 
done(self, state)
By default, machines don't terminate

Inherited from sm.SM: check, doTraceTasks, getStartState, guaranteeName, isDone, printDebugInfo, run, start, step, transduce, transduceF

Class Variables
  forwardGain = 1.0
Gain for driving forward
  rotationGain = 1.0
Gain for rotating
  angleEps = 0.05
Tolerance for angles
  distEps = 0.05
Tolerance for distances
  maxVel = 0.5
Maximum velocity
  startState = False
By default, startState is none

Inherited from sm.SM: legalInputs, name

Instance Variables

Inherited from sm.SM: state

Method Details

getNextValues(self, state, inp)

 

Default version of this method. If a subclass only defines getNextState, then we assume that the output of the machine is the same as its next state.

Overrides: sm.SM.getNextValues
(inherited documentation)

done(self, state)

 

By default, machines don't terminate

Overrides: sm.SM.done
(inherited documentation)