Comp150-07: Intelligent Robotics
Lab 4: Wavefront planner
Due Tuesday, February 17rd, in class

In this lab, we will program a mobile robot to do motion planning with the wavefront algorithm.

The objective is to navigate a known obstacle course (the "world") from a given starting point to a given goal point, while not coming in contact with any obstacles nor running outside the "world" space.

The world consists of a 8'x4' flat space divided into 6"x6" squares, which makes for a 16x8 square grid. The obstacles are 4 squares long and 1 square wide and there are 4 of them. On demo day, you will be assigned one of these two courses:

World 1:

{ { 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1 },
  { 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 },
  { 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 },
  { 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 }, 
  { 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0 },
  { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 },
  { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 },
  { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 } }

World 2:
{ { 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0 },
  { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 },
  { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 },
  { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 },
  { 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0 },
  { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 },
  { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 },
  { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 } }

We will give the robot its initial coordinates (x,y starting from the lower-left corner, which is positioned at 0,0), and the goal coordinates. The robot is to plan an efficient path from its starting position to the goal, then execute it, without touching obstacles or going off the world map, and stop in the goal square.

You will place the robot in the starting square with any orientation you choose, but with the robot center positioned on the center of the starting square. Please have a marker on the center point of your robot. Your grade will largely be based on the performance of your robot, as defined by its success in reaching the goal, not coming into contact with obstacles, and not running off the world map. Reaching the goal perfectly means the center of the robot is positioned exactly on top of the center of the square.

Once you have placed the robot on the starting square, you may press a button to start your program, but you may not touch the robot or give it any other inputs until it has either failed or reached its goal. A failure occurs when the robot touches an obstacle, runs off the map, or is no longer moving towards the goal (e.g., fails to stop at the goal and continues moving). You get 3 trials to demonstrate your robot's abilities.

Constraints: vehicle must fit within a 6"x6" footprint. No height restrictions.

Grading points: (best of 3 trials)
Robot stays in free space: 15%
Robot's final location: 60%
0.5 squares off (-6 points)
1.0 squares off (-12 points)
1.5 squares off (-20 points)
2.0 squares off (-30 points)
2.5 squares off (-45 points)
3 or more squares off (-60 points)
Lab report: 25%

Tips and things to think about:

Your robot is not a point, but has a footprint. Allow for the robot's size when planning motion not only around obstacles, but also along the map edges.

The NXT brick has limited memory. Use unsigned chars and bools instead of ints and longs when possible.

You will need an accurately translating and rotating base (use your best design from Lab 3 and make sure it is as close to holonomic as possible), and subroutines or inline functions that can take you from one square to another. Choose your connectivity (Moore or von Neumann neighborhoods) wisely.

This is a programming-intensive lab. Make sure to start early, work together as a team, and test early and often.

Hand in

Each group will do a demo in class on Tuesday, Feb 17. In addition, please hand in a hard copy of one lab report per group with the following information: Please make your report one complete document. As always, a good way to write the lab report is to make it a webpage (you must still print out one copy to hand in during class). Send me the link if you do!
Paulina Varshasvkaya, paulina [at] cs.tufts.edu

This lab is based on materials by Prof. Choset (CMU), with permission.