Bug algorithm
Bug algorithm is a class of algorithm that helps robots deal with motion planning.
Basic assumptions
- The robot is treated as a point inside a 2D world.
- The obstacles are unknown and nonconvex.
- There are clearly defined starting point and goal.
- The robot is able to detect obstacle boundary from a distance of known length.
- The robot always knows the direction and how far it is from the goal.
Algorithm
The most basic form of Bug algorithm is as follows:- The robot moves towards the goal until an obstacle is encountered.
- Follow a canonical direction until the robot reaches the location of initial encounter with the obstacle.
- The robot then follows the obstacle's boundary to reach the point on the boundary that is closest to the goal.
- Go back to step 1. Repeat this until the goal is reached.