MATLAB code for simulated Roomba to detect randomly generated obstacles
Ältere Kommentare anzeigen
My son has a project involving making a simulated Roomba robot vacuum cleaner go around a generated room map, detect the obstacles, and then output a new room map with the obstacles in their (correct) detected places. The user inputs the desired rectangular room size, then the DrawMap function generates a room on screen and takes random generated values from a 4x4 matrix to places "obstacles" in the displayed map. He has that part done and working correctly, but is having trouble coming up with code to 1) move the Roomba (basically the index) vertically and horizontally through the "room," 2) detect the obstacles (depicted as lines or figures outlined by the * character on screen), and 3) mark the obstacles for display in the new room map. I would guess the detected/marked obstacles would be stored in a second 4x4 matrix that would then be used to display the obstacles in the new map. Any suggestions? The DrawMap function was new to him so he does not know how that works...
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Robotics finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!