Avoiding obstacles

Planning paths without obstacles is, as has been shown, quite easy. However, it becomes a bit more challenging when your robot needs to walk around obstacles. Let's look at a case where there is an obstacle in the path you calculated previously. It might look like this:

You can still use the same path planning algorithm to find the starting angle; however, you'll now need to use your sonar sensor to detect the obstacle. To keep this all very simple, you'll do this in steps. You'll turn and move toward the obstacle for a one-time distance. Then, you'll check whether there is a barrier. When your sonar sensor detects the obstacle, ...

Get BeagleBone Robotic Projects - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.