MEM380: Fundamental Robotics I
Assignment 5
Due: Tuesday, 11/02/09, 11:59pm EST
1
Objective
The objective of this assignment is to implement the A* algorithm. You are given the following
Matlab
files:
•
addToStack.m
: Usage
outStack = addToStack(newElement, originalStack)
where
newElement
can be an array or structure and
orginialStack
is an
L
×
1 array of elements of type
newElement
. This function will attach
newElement
to the top of the stack given by
originalStack
.
•
popOffStack.m
: Usage
[outElement, newStack] = popOffStack(originalStack)
where
outElement
is the first element in
originalStack
and
newStack
is the
originalStack
with
the first element removed.
•
AstarTestmap.txt
: A sample map. To load this into Matlab use
map = load(’testmap.txt’)
.
This results in an
N
×
M
matrix such that every element represents a cell in the environment
 a 0 denotes empty space, a 1 denotes an obstacle.
This is the
occupancy grid
for your
environment.
Requirements:
You MUST use
Matlab
to complete this assignment.
2
Background
The problem of planning a path given a start and a goal position is called the
path planning problem
.
We often encounter such problems in the area of mobile robotics where the goal is to give the robot
the ability to determine how it should navigate from its current location to some desired goal
position. As such, we must consider the robot’s start and goal positions as well as the geometry of
the environment,
i.e.
the location of the obstacles, the size of the obstacles, and the such. (This is
also a common problem in video game design where the programmer must be able to compute the
trajectories that the numerous characters follow in a game.)
There are numerous existing methods that can be employed to solve the path planning problem.
A common approach is to tesselate the workspace into cells. Once the workspace has been properly
discretized, one can represent the layout of the workspace using what is called an
occupancy grid
.
An occupancy grid is simply a data structure used to encode the layout of the workspace. One can
interpret the occupancy grid as simply a map of the environment where free space is represented by
clear cells and occupied space,
i.e.
space where obstacles reside, is represented by solid cells. Figure
1(a) shows an occupancy grid for a workspace that has been tesselated into cells of varied size and
shapes while Figure 1(b) shows an occupancy grid obtained using a fix grid decomposition of the
workspace. From these two examples, we see that it is possible to represent any given occupancy
grid as arrays of 0s and 1s where 0s denote free space and 1s denote occupied space. Furthermore,
1
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
(a)
(b)
Figure 1: (a) General tesselation of an environment. Such methods will result in an occupancy grid
with cells of varying sizes and shapes. (b) A grid decomposition of an environment. These results
This is the end of the preview.
Sign up
to
access the rest of the document.
 Spring '09
 ZHOU
 A* search algorithm, Consistent heuristic, open list

Click to edit the document details