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.
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:
- Motor noise was compounded as the robot turned and made no attempt to correct itself.
- There is a high probability that the robot could become stuck in an infinite loop because he only turns one way (see diagram below).
- The only solveable mazes would need to contain no loops, and this is assuming that the robot will stay dead straight.
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.
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:
- There were no collsions, so the robot's navigation was more reliable however not perfect.
- It handled narrow corridors better because it turns earlier
However it didn't solve some problems that existed in the first attempt:
- It made no attempt to correct itself.
- The robot could become stuck in an infinite loop because he only turns one way
- The robot can only solve simple mazes
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.
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.