Task #3 Navigating a Maze

Shim Kporku & Ariel Taylor

Robotics and Artificial Intelligence

Write-Up for Task 3.

The objective of this task was to have the robot traverse within a maze to a particular point guided only by the sensors attached. There are also few obstacles within the maze that the robot must navigate around without assistance. For our group, we choose to use wall and line following to help guide the robots movement to the goal point. The following sensors were used in this task: two sonar sensors, and a light sensor. When the robot reached the target it made a sound to indicate that it has arrived at the proper destination.

The strategy for solving the maze was split into 3 parts:

-Enter the maze

-Wall follow

-When in space find a wall.

Enter the maze

The entire code was place in a

while (true)

{                  }

loop condition. The first few lines of code – move in a straight line – were therefore the state the robot reverted when it was not doing anything else i.e. its default state.  When it encountered an obstacle it reacted by wall following or turning. As such when the robot entered the maze it turned right and continued into the maze by wall following.

 

Wall following

Wall following was implemented with two ultrasound sensors mounted at the front of the robot at 90 degree angles. One was placed at the front to detect oncoming obstacles, the second one was positioned at the side to implement wall following. There were three possible states for wall following which were: a specific distance from the wall, greater than that distance and less than that distance.

 

Fig 1.1 Robot with 2 ultrasound sensors and a light sensor.

 

As a result when the robot was that specific distance from the wall it moved in a straight line. If it was greater it reacted by turning gently to the left (towards) and finally if it was less it reacted by turning to the right (away) . This gave the robot a slightly S-shaped movement as it moved.

 

 

When in space find a wall

When the robot no longer could follow a wall we encountered a problem. The robot continued to move forward until it ran into another wall section of the maze. A solution was devised but not implemented because it did not work all the time. Essentially if both ultrasound sensors did not find a wall, implemented with nested if statements, the robot was to turn 90 degrees and move forward a bit. It was to do this until it encountered a wall. However the robot tended to move in circles without finding a wall. Essentially it was our biggest challenge.

Fig 1.2 Robot lost in space.

With your teammate think about two problems, relevant to Ghana the solution of which could involve sensing as an important component

Problem 1

One problem relevant to Ghana is traffic congestion. If there were some cameras installed to detect the heavily congested areas then the patterns of the traffic can shift to help reduce the amount of cars that pass through a green light. For the traffic monitor a camera for visual detection of the traffic situation would be used. The camera will broadcast to a road service station and show the peak hours of traffic prone areas. From there the controllers can be changed so that the traffic lights can change the flow of cars in major intersections.

 

Problem 2

Most forms of public transport such as  buses, minibuses or taxis have a maximum weight limit or maximum number of people that should be allowed on board. However, in trying to get access to remote areas, making multiple trips with only the legal number of people on board these transport systems is not feasible, especially given the distance and time it would take. As a result, these vehicles tend to be overloaded to transport as many people/goods as possible to their destinations. In general when travelling with an overloaded vehicle the only problem tends to be with travelling uphill. A gyroscope sensor in addition to a weight sensor will provide the driver with the appropriate feedback to determine if it can move uphill with that weight. The gyroscope determines the angular velocity in which an object is travelling. Depending on the values shown, this sensor can gage the different levels of how the load can be carried based on its weight and the road. If applied to the transportation sector, this tool can improve road safety to some extent.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s