// This file contains three example floor FSMs, then a couple wall FSMs // then finally a landmark FSM or two... (Aug8) // Some of the color numbers and action numbers are greater than 15 (4 bits); // it is expected that these will be set at merge time to parameters determined // by whatever (posterized) colors are actually needed there. 5 <--- this number on the first line tells the reader max # states coming. // PSU EB 88-03 floor FSM.. 1.0 = 2 -- black might be bottom of wall, or large speckle 1.1 = 2 -- ditto very dark gray 1.2 = 1 -- ditto dark gray 1.3 = 1 -- ditto medium dark 1.4 = 1 -- medium light: bottom not yet seen 1.5 = 1 -- light gray: ditto 1.6 = 1 -- very light gray: ditto 1.7 = 0 -- white: not floor 1.12 = 1 -- carpet has some red 1.11 = 1 -- carpet has some yellow 1.13 = 1 -- carpet has some tan 2.0 = 3 -- start sequence of black/dk.gray 2.1 = 3 2.2 = 1 2.3 = 1 2.4 = 1 -- too soon for light: go back to floor 2.5 = 1 2.6 = 1 2.7 = 0 2.12 = 1 2.11 = 1 2.13 = 1 3.0 = 4 -- 2nd in sequence of black/dk.gray 3.1 = 4 3.2 = 4 3.3 = 1 -- too soon for light: go back to floor 3.4 = 1 3.5 = 1 3.6 = 1 3.7 = 0 3.12 = 1 3.11 = 1 3.13 = 1 4.0 = 0 -- too much black/dk.gray, not valid floor 4.1 = 0 4.2 = 0 4.3 = 1 4.4 = 1 4.5 = 1 4.6 = 1 4.7 = 0 4.12 = 1 4.11 = 1 4.13 = 1 ... <--- end of FSM 2 <--- this number on the first line tells the reader max # states coming. // Generic FSM for 3-color floor (like Montreal).. 1.0 = 0 -- no black 1.1 = 0 -- ditto very dark gray 1.2 = 0 -- ditto dark gray 1.3 = 1 -- medium dark gray allowed 1.4 = 1 -- ditto medium light 1.5 = 1 -- light gray: ditto 1.6 = 0 -- very light gray: not floor 1.7 = 0 -- white: not floor 1.16 = 1 -- replace '16' with 1st non-gray color 1.17 = 1 -- replace '17' with 2nd non-gray color (or omit) ... <--- end of FSM 2 <--- this number on the first line tells the reader max # states coming. // FSM for concrete floor.. 1.0 = 0 -- no black 1.1 = 0 -- ditto very dark gray 1.2 = 1 -- dark gray allowed 1.3 = 1 -- medium dark gray allowed 1.4 = 1 -- ditto medium light 1.5 = 1 -- light gray: ditto 1.6 = 0 -- very light gray: not floor 1.7 = 0 -- white: not floor ... <--- end of FSM 6 <--- this number on the first line tells the reader max # states coming. // Generic FSM for solid-color panel.. 1.0 = 2 -- black might be shadow under wall 1.1 = 2 -- ditto very dark gray 1.2 = 0 -- dark gray: not floor 1.3 = 0 -- ditto medium dark 1.4 = 0 -- ditto medium light 1.5 = 0 -- light gray: ditto 1.6 = 0 -- very light gray: ditto 1.7 = 0 -- white: not floor 1.18 = 4 + 11 -- replace '18' with actual panel color 2.0 = 3 -- shadow might be more than one pixel 2.1 = 3 2.2 = 1 2.3 = 1 2.4 = 1 2.5 = 1 2.6 = 1 2.7 = 0 2.18 = 4 + 11 -- replace '18' with actual panel color 3.0 = 0 -- too much black/dk.gray, not valid wall 3.1 = 0 3.2 = 0 3.3 = 1 3.4 = 1 3.5 = 1 3.6 = 1 3.7 = 0 3.18 = 4 + 11 -- replace '18' with actual panel color 4.0 = 0 -- too much black/dk.gray, not valid wall 4.1 = 0 4.2 = 0 4.3 = 0 4.4 = 0 4.5 = 0 4.6 = 0 4.7 = 0 4.18 = 5 + 11 -- confirm actual panel color 5.0 = 0 + 32 -- top of wall (replace '32' with '2'-'7' actual) 5.1 = 0 + 32 5.2 = 0 + 32 5.3 = 0 + 32 5.4 = 0 + 32 5.5 = 0 + 32 5.6 = 0 + 32 5.7 = 0 + 32 5.8 = 0 + 32 -- (remove whichever color is '18') 5.9 = 0 + 32 5.10 = 0 + 32 5.11 = 0 + 32 5.12 = 0 + 32 5.13 = 0 + 32 5.14 = 0 + 32 5.15 = 0 + 32 5.18 = 5 -- wait for end of panel color ... <--- end of FSM 10 <--- this number on the first line tells the reader max # states coming. // Generic FSM for solid-color wall with dark baseboard.. 1.0 = 2 -- black baseboard under wall 1.1 = 2 -- ditto very dark gray 1.2 = 2 -- ditto dark gray 1.3 = 0 -- ditto medium dark 1.4 = 0 -- medium light: not wall 1.5 = 0 -- light gray: ditto 1.6 = 0 -- very light gray: ditto 1.7 = 0 -- white: not wall 1.18 = 0 2.0 = 3 -- minimum 8 pixels baseboard height 2.1 = 3 2.2 = 3 2.3 = 3 2.4 = 1 -- otherwise assume a floor blip 2.5 = 1 2.6 = 1 2.7 = 0 2.18 = 0 3.0 = 4 -- still counting baseboard 3.1 = 4 3.2 = 4 3.3 = 4 3.4 = 0 3.5 = 0 3.6 = 0 3.7 = 0 3.18 = 0 4.0 = 5 -- still counting baseboard 4.1 = 5 4.2 = 5 4.3 = 5 4.4 = 0 4.5 = 0 4.6 = 0 4.7 = 0 4.18 = 0 4.0 = 5 -- still counting baseboard 4.1 = 5 4.2 = 5 4.3 = 5 4.4 = 0 4.5 = 0 4.6 = 0 4.7 = 0 4.18 = 0 5.0 = 6 -- still counting baseboard 5.1 = 6 5.2 = 6 5.3 = 6 5.4 = 0 5.5 = 0 5.6 = 0 5.7 = 0 5.18 = 0 6.0 = 7 -- still counting baseboard 6.1 = 7 6.2 = 7 6.3 = 7 6.4 = 0 6.5 = 0 6.6 = 0 6.7 = 0 6.18 = 0 7.0 = 8 -- baseboard confirmed 7.1 = 8 7.2 = 8 7.3 = 8 7.4 = 0 7.5 = 0 7.6 = 0 7.7 = 0 7.18 = 0 8.0 = 8 -- baseboard is good, but there may be more 8.1 = 8 8.2 = 8 8.3 = 8 8.4 = 0 8.5 = 0 8.6 = 0 8.7 = 0 -- (replace '33' with actual '2'-'7') 8.19 = 9 + 33 -- saw wall color (replace '19' with actual color) 9.19 = 9 -- wait for non-wall (replace '19' with actual) 9.0 = 0 -- (got it) 9.1 = 0 9.2 = 0 9.3 = 0 9.4 = 0 9.5 = 0 9.6 = 0 9.7 = 0 ... <--- end of FSM 1115 <--- this number on the first line tells the reader max state # coming. // Generic FSM for single-color landmark on solid-color wall.. // replace state #s 1111+n with actual top of wall state # (+n).. 1111.0 = 0 -- gotta start in wall color, not black 1111.1 = 0 -- ditto very dark gray 1111.2 = 0 -- dark gray: not floor 1111.3 = 0 -- ditto medium dark 1111.4 = 0 -- ditto medium light 1111.5 = 0 -- light gray: ditto 1111.6 = 0 -- very light gray: ditto 1111.7 = 0 -- white: not wall 1111.21 = 1112 -- replace '21' with actual wall color 1112.0 = 0 -- stay in wall color, error if black 1112.1 = 0 -- ditto very dark gray 1112.2 = 0 -- dark gray: not floor 1112.3 = 0 -- ditto medium dark 1112.4 = 0 -- ditto medium light 1112.5 = 0 -- light gray: ditto 1112.6 = 0 -- very light gray: ditto 1112.7 = 0 -- white: not wall 1112.21 = 1112 -- replace '21' with actual wall color 1112.22 = 1113 -- replace '22' with actual landmark color 1113.0 = 0 -- stay in wall color, error if black 1113.1 = 0 -- ditto very dark gray 1113.2 = 0 -- dark gray: not floor 1113.3 = 0 -- ditto medium dark 1113.4 = 0 -- ditto medium light 1113.5 = 0 -- light gray: ditto 1113.6 = 0 -- very light gray: ditto 1113.7 = 0 -- replace '44' with actual '7'-'3'... 1113.21 = 1114 + 44 -- replace '21' with actual wall color 1113.22 = 1113 -- replace '22' with actual landmark color 1114.0 = 0 -- stay in wall color, error if black 1114.1 = 0 -- ditto very dark gray 1114.2 = 0 -- dark gray: not floor 1114.3 = 0 -- ditto medium dark 1114.4 = 0 -- ditto medium light 1114.5 = 0 -- light gray: ditto 1114.6 = 0 -- very light gray: ditto 1114.7 = 0 -- replace '44' with actual '7'-'3'... 1114.21 = 1114 -- replace '21' with actual wall color 1114.22 = 0 -- replace '22' with actual landmark color ... <--- end of FSM 1114 <--- this number on the first line tells the reader max state # coming. // Generic FSM for solid single-color landmark (like a wooden door).. // replace state #s 1111+n with actual top of wall state # (+n).. 1111.0 = 0 -- gotta start in landmark color, not black 1111.1 = 0 -- ditto very dark gray 1111.2 = 0 -- dark gray: not floor 1111.3 = 0 -- ditto medium dark 1111.4 = 0 -- ditto medium light 1111.5 = 0 -- light gray: ditto 1111.6 = 0 -- very light gray: ditto 1111.7 = 0 -- white: not wall 1111.23 = 1112 -- replace '23' with actual landmark color, frex 13 for wood 1112.0 = 0 -- stay in landmark color, error if black 1112.1 = 0 -- ditto very dark gray 1112.2 = 0 -- dark gray: not floor 1112.3 = 0 -- ditto medium dark 1112.4 = 0 -- ditto medium light 1112.5 = 0 -- light gray: ditto 1112.6 = 0 -- very light gray: ditto 1112.7 = 0 -- white: not wall 1112.23 = 1113 -- replace '23' with actual landmark color 1113.0 = 0 + 45 -- confirmed landmark, accept if any other color 1113.1 = 0 + 45 -- replace '45' with actual '7'-'3'... 1113.2 = 0 + 45 -- dark gray: accept 1113.3 = 0 + 45 -- ditto medium dark 1113.4 = 0 + 45 -- ditto medium light 1113.5 = 0 + 45 -- light gray: ditto 1113.6 = 0 + 45 -- very light gray: ditto 1113.7 = 0 + 45 -- replace '45' with actual '7'-'3'... 1113.8 = 0 + 45 -- (omit actual landmark color) 1113.9 = 0 + 45 1113.10 = 0 + 45 1113.11 = 0 + 45 1113.12 = 0 + 45 1113.13 = 0 + 45 1113.14 = 0 + 45 1113.15 = 0 + 45 1113.23 = 1113 -- replace '23' with actual landmark color ... <--- end of FSM