For a Robotics class assignment, I had to program a robot with obstacle avoidance behavior, such that it ends up walking around an unknown environment, without hitting anything.
The behavior was tested on Kurt robot in USARsim environment. The obstacle avoidance was very simple. The speed was linearly controlled by the distance to any obstacle in front of the robot: If there were no obstacles for X meters in front of the robot, the robot would drive at full speed; if there was an obstacle at Y meters in front of the robot, the robot would have no net forward speed; and in other cases, the speed was calculated linearly between X and Y. The driving direction was determined by applying a fuzzy logic control over the laser scanner readings to assign weights to different directions: If the distance to obstacle on the left was larger than on the right, the robot turned left. This can be visualised from the lecture notes from Dr. Andreas Nuechter:
However, running the plain code lead to a couple of tricky situations where the robot got stuck, such as when it could not “see” the glass or the legs of the table gave it false sense of free-space. So we modified the code so that it makes a turn if it is stuck somewhere, and to give more importance to larger openings it sees via the laser scanner.
The result can be seen below:
Stanislav Gutev and