Joe O'Reilly

AI - Task Sheet 5

20 Dec 2011

5.1

Basic Obstacle Detection & Avoidance With Touch

Bumper Attached and Ready

Below is the algorithm that moves the robot forwards until its bump sensor is activated when it stops, backs up and turns.

Move and Bump

Here is the back turn behaviour, stop motors, move back turn on the spot towards the right hand side.

Back Turn

5.1a

Touch-Based Obstacle Avoidance as a way of Traversing a Simple Maze

We used the algorithm described in section 5.1 and attempted to navigate a maze. There were a handfull of errors:

5.2

Basic Obstacle Detection & Avoidance With Ultrasound

First we moved one of the robots ultrasonic sensors to face forwards(right) then we built a program to control the robot's movement.

Here you can see we have a loop containing a forwards motor control block then an if based on the forward facing sensor. When the robot got too close it would turn, as it didn't bump we didn't require any reversing.

Here is the settings used in the ultrasonic sensor if block.

5.2a

Ultrasound-Based Obstacle Avoidance as a way of Traversing a Simple Maze

When we used this code to attemp to solve a maze it had some improvements:

However it didn't solve some problems that existed in the first attempt:

5.3

Wall-Following With Obstacle-Avoidance With Touch

We used the reactive control algorithm fro Task 4.3 including its bump behaviour. This worked very well and will probably be the algorith we used in the maze. To make the robot follow a wall on its other side we had to move the utlrasonic sensor to that side and change the program to turn the right way.

For the robot to chose between two walls a master program would have to be built that either executed wall following on the left or right depending on it's sensor readings.

5.4

Wall-Following With Obstacle-Avoidance With Ultrasound

We moved the to the front and changed the code to turn when it got too close (<10cm) to a wall and then turn. The Robot was a little unpredicable when sensing ahead and movign, to compensate we slowed it down.

Next

AI - Task Sheet 2

Previous

AI - Task Sheet 4