With the three sensors providing coverage to check for barriers from the front as well as from either side you can add to your path planning capabilities. You can use the program that you wrote in Chapter 3,Making the Unit Mobile - Controlling Wheeled Movement. Before you start, here are some basics of dynamic path planning. Let's first address the problem where you know where you want to go and need to execute a path without barriers and then add in barriers.
In order to talk about dynamic path planning, that is, planning a path where you don't know what barriers you might encounter, you'll need a framework to understand where your robot is as well as to determine the location of the goal. One common framework is an x and y grid. Here is a drawing of such a grid:
There are three key points:
- The lower-left point is a fixed reference position. The directions x and y are also fixed; all other positions will be measured with respect...