Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1 Description This project builds directly on the last one. Now that we can get the robot to follow a plan, we turn to building

1 Description
This project builds directly on the last one. Now that we can get the robot to follow a plan, we turn to building
aplan.
2 Start up
1. You will be given a folder called project6 which contains a lot of familiar-looking files.
2. The control program is in the file make-plan.cc, so first build that:
./build make-plan
then run player on the config file world6.cfg:
player world6.cfg
3. The robot, as it has at the start of previous projects, will trundle off to the south-east.
4. However, before it starts to move, it will display something new
5. This is an occupancy grid with a resolution of 0.5 meters (for the format of the grid, see below). For
the purposes of the project, this is a map.
6. The program will also display a plan, just like last time.
3 Map format
1. In terms of this project, an occupancy grid map is an array of integers.
2. A 1 indicates that a square is occupied, a 0 indicates that it is not occupied.
3. The code in make-plan.cc assumes that the map is square, so there is only one parameter that
controls the size of the map.
4. In the example in the folder project6, each grid square is half a meter on each side.
5. This example map is for a map that is 16 meters on each side.
6. An example map is given in Figure 1(b), while Figure 1(a) shows the corresponding simulated world
from Stage.
7. Note that this is NOT the world youll be using in the project (though it is probably familiar from
previous projects).
8. In addition, the occupancy grid in Figure 1(b) is lower resolution than the map in make-plan.cc
each square is one meter on each side. (a) An example woeld in which the robot operabes.
(b) An occupuncy grid map.
Figure 1: A simulated world and the corresponding occupancy grid map4 Use the map to plan
1. The big task for this week is to write a robot controller that can use an occupancy grid to plan a
route through the world represented by the occupancy grid.
2. The task assumes that you start with an occupancy grid, a set of coordinates that the robot starts
at, and a set of coordinates that the robot has to end up at.
3. The task is then to generate a plan that is a sequence of sets of coordinates. The first of these sets
of coordinates is the initial location of the robot, the last set of coordinates is the final location of
the robot, and each intermediate point is a point that the robot should pass through on its way from
the initial location to its final location.
4. You need to choose the intermediate locations carefully so that the robot can move in a straight line
from one to the next without encountering an obstacle.
5. A suitable way to create the plan is to use the wavefront planner we discussed in class. You could
also use the A* search algorithm, which is considered optimal.
6. You should use the map that came in make-plan.cc (map.txt), which corresponds (well enough)
to the map that world6.cfg will load. Please note, the readMap() function used in the sample
make-plan.cc reads the map in a way that the lower-left corner of the grid cell coordinates is
treated as the origin (map[0][0]). If you would rather the top-left corner to be the origin, you need
to modify the code slightly. Obviously then you also need to consider the conversion between the
real map coordinates (-8m to 8m in both x and y coordinates) and the grid coordinates (0 to 31).
Please also note that in map[i][j], i represents vertical and j represents horizontal, whereas in
your representation of a point (x, y) in a real map, x represents horizontal and y represents vertical.
7. Your final program should be able to create a plan from the map and then follow the plan. The
plan following can just be the code you wrote for the last project. A correct plan is worth 7
points. As the output of your program you need to create a plan-out.txt file which contains
only the waypoints (not all the trail points of your search algorithms output). To help me out in
understanding your plan, you should also make use of the provided writeMap() function to
output a map-out.txt file, where among other 0s and 1s, you place the number 2 at the
coordinates where a waypoint should be.
8. The robot actually following the plan is worth 1 point, for which you might need to consider
dilating the obstacle occupancies to plan around the corners.
9. The start point for the robot is where it starts in the simulation, (6,6). The end point is (6.5,
6.5).
10. Once your controller can do this, save your working program as (your-names)-proj6.cc and
make sure you put your name in the comments.
11. Youll need to submit the .cc file together with the plan-out.txt and map-out.txt files to me
after you are done with the project
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Databases And Information Systems 23rd European Conference Adbis 2019 Bled Slovenia September 8 11 2019 Proceedings Lncs 11695

Authors: Tatjana Welzer ,Johann Eder ,Vili Podgorelec ,Aida Kamisalic Latific

1st Edition

3030287297, 978-3030287290

More Books

Students also viewed these Databases questions

Question

What is middleware, and what does it do?

Answered: 1 week ago