SPL Programming Procedure Pattern Simple Mission Maze Explorer Slides: 23 Download presentation SPL Programming – Procedure Pattern Simple Mission – Maze Explorer Young Joon Kim http: //www. helloapps. com Topics • LRF Procedure • Procedure Pattern for the Maze Explorer 2 LRF Procedure 3 LRF Procedure • Start with basic maze environment 4 LRF Procedure • Add “/Procedure_Sensor. Notify: ” option under the “Add. Laser. Range. Finder. Entity” 5 LRF Procedure • Type “proc 1” 6 LRF Procedure • Add “Procedure” 7 LRF Procedure • Add variables to keep distance values 8 LRF Procedure • Add “print” command 9 LRF Procedure • Save script as “script/Maze 6. txt” 10 LRF Procedure • Execute result 11 LRF Procedure • Execute result 12 Procedure Pattern for the Maze Explorer 13 Procedure Pattern for the Maze Explorer • Start with basic procedure pattern 14 Procedure Pattern for the Maze Explorer • Add Boolean variable to keep the turning state 15 Procedure Pattern for the Maze Explorer • Add “if” liines 16 Procedure Pattern for the Maze Explorer • Add lines to make robot turn right 30 degrees 17 Procedure Pattern for the Maze Explorer • Add “else” lines to turn right 18 Procedure Pattern for the Maze Explorer • Completed script 19 Procedure Pattern for the Maze Explorer • Save script as “script/Maze 7. txt” 20 Procedure Pattern for the Maze Explorer • Executed result 21 Procedure Pattern for the Maze Explorer • Executed result 22 Procedure Pattern for the Maze Explorer • Executed result 23