Module boundarySM
[frames] | no frames]

Module boundarySM

Very simple behavior for following the boundary of an obstacle in the world, with the robot's 'right hand' on the wall.

Classes
  BoundaryFollowerSM4
State machine with instances of io.SensorInput as input and io.Action as output.
  BoundaryFollowerSM2
State machine with instances of io.SensorInput as input and io.Action as output.
Functions
 
clearTest(selectedSensors, threshold)
 
frontClear(sensors)
 
leftClear(sensors)
 
rightClear(sensors)
 
frontSonars(sensors)
 
front6Sonars(sensors)
 
leftSonars(sensors)
 
rightSonars(sensors)
 
rightmostSonar(sensors)
 
wallInFront(sensors)
 
wallOnRight(sensors)
 
pickAction(state)
Variables
  sideClearDist = 0.3
  clearDist = 0.25
  forwardSpeed = 0.25
  rotationalSpeed = 0.25
  stop = io.Action(0, 0)
  go = io.Action(forwardSpeed, 0)
  left = io.Action(0, rotationalSpeed)
  right = io.Action(sideClearDist* rotationalSpeed,-rotationalSp...
Variables Details

right

Value:
io.Action(sideClearDist* rotationalSpeed,-rotationalSpeed)