Embedded Motion Control 2017 Group 3 / Maze Design
This page is part of the Embedded Motion Control Group 3 of 2017.
This page is about the design for the Maze challenge. After the corridor challenge we were left with a number of issues:
1.) The turning was not very robust outside of the simulation and would fail often
2.) During the last few days of testing and coding before the corridor challenge we made rapid changes to the codebase without properly refactoring so we had incurred some technical debt.
3.) Keeping the PICO aligned to the wall during navigation was a problem
To solve there problems we decided to go with a new approach for the motion control. We discarded a big part of the code and refactored the rest to make the code easyier to change and maintain.
We removed the wall/path detection and replaced it with what we call the "world interpreter" whose function it is to take all the sensor data and do all the processing required for the rest of the code. For example dead end detection for the door supervisor and calculating the angle to the nearest obstacle pint for the wallfollowing function in the motion supoervisor. All the processed data is stored in the world model which is a struct that gets distributed to the supervisors in the main loop. This is clearly visible in the short (82 lines) and well documented main.cpp[1].