ME131 Lab 2

From Robotics Wiki

Jump to: navigation, search

Contents

Lab 2 - Implementing Scan-matching

Objectives

  • Implement the Lu-Milios Scanmatching algorithm
  • Observe the advantages / disadvantages between wheel odometry and scanmatching
  • Quantify the error associated with both localization methods

Assignments

1. Implementing Scanmatching

  • Finish programming the remainder of the Lu-Milios Scanmatching algorithm. In particular, once point correspondence is established (from Lab 1), feed those point matches into another function which estimates the optimal rotation and translation which minimizes the error:
    [w, T, error] = optimizeScanMatchError(scan1, scan2, C_correspondence, w_guess, T_guess)

where C_correspondence is the correspondence relations you've computed from last week's lab and w_guess and T_guess is a guess at the rotation and translation which aligns the second scan (scan2) into the reference frame of the 1st (scan1). The output of this function is the rotation between the two scans, w, the translation ,<T, and the cumulative error between the two aligned scan points.

  • Because the Lu-Milios algorithm is iterative in nature, you will essentially iterate between calls to this function and the one you wrote last week, i.e.:
    while(error < THRESH  OR num_iter > MAX_NUM_ITER)
       {             
          [ C ] = find_correspondence(scan1, scan2, w, T);
          [w, T, error] = optimizeScanMatchError(scan1, scan2, C, w, T);
          num_iter = num_iter + 1;
       }

2. Testing Scanmatching

  • Write a simple client-code (compatible with Player/Stage) that does the following:
    • i) takes in console input (either user input or from a file) for a requested goal position-- (x,y) only
    • ii) commands the robot to take a laser scan and store it in an appropriate "scan" structure format (you decide); call this scan1
    • iii) moves the robot to the requested position (you may use your GoTo function that you wrote for ME132 but NOT the GoTo function provided in Player as this function does not work on the testbed; if you are need of a GoTo function and don't have the one you wrote for ME132, contact your TAs and we can work something out)
    • iv) commands the robot to take a second laser scan after reaching the goal and stores this scan in an appropriate "scan" structure; call this scan2
    • v) feeds in scan1 and scan2 into the scanmatching function and displays the returned pose estimate of the robot
    • vi) repeats steps i - v

3. Scanmatching & Overlap

In this exercise, we'll quantify the limits for which scanmatching will work.

  • Using the program written in #2, command the following sequence of points for the robot to go to, and fill in (a copy of) the table below -- you can use the wheel odometry as your initial guess (wheel odometry can be read out by using the Position Proxy class in Player/Stage, documented here):
Goal Pt Odometry Pose Scanmatching Pose Number of Iterations Convergence? (Y/N)
(1,0) -
(1,1)
(1,2)
(.5,1)
(1,-.5)
  • What do you notice about the amount of scan-overlap and its dependence on producing a valid pose estimate? (a few sentences describing your observations is enough)

4. Scanmatching & the Initial Guess

In this exercise, we'll quantify the limits for which the initial guess for seeding the scanmatching algorithm will yield convergence. Note that for the previous exercise, we used odometry as our initial guess. Here, we'll intentionally introduce error in the odometry estimate and see what limits will cause the algorithm to break down.

  • Still using the program written in #1, have the robot elevated above the ground centered at the origin and command a forward displacement of 5cm, 10cm, 30cm, and 50cm and fill in the following table:
Displacement Odometry Pose Scanmatching Pose Number of Iterations Convergence? (Y/N)
15cm -
20cm
30cm


  • Restart your program and now command a clockwise rotation of 5deg, 10deg, 15deg, and 20deg and fill in the following table:
Angular Displacement Odometry Pose Scanmatching Pose Number of Iterations Convergence? (Y/N)
2 deg -
4 deg
8 deg
12 deg
  • What do you notice about the sensitivity of the algorithm to introduced error? Is the algorithm more sensitive to errors in translation or orientation?

NOTE: For this lab, you must turn in your results for the three tables as well as answers/observations related to questions noted in the assignment

Scheduling

You need to schedule a slot to conduct your robot experiments on the testbed.

Before you can test your algorithms on the robots, you have to demonstrate its functionality to the TA in Stage! You should NOT use your robot time to do code development or major debugging; otherwise be prepared to reschedule for another time slot or for a special appointment with the TA's.


LAB 2 Times

DATE/TIME NAMES
29-April, 3:00
29-April, 3:45
29-April, 4:30 Ben Flora & Jeff Flanigan
29-April, 5:15 Paul Hebert & Dom Rizzo

LAB 2 Times (cont)

DATE/TIME NAME
30-April, 3:00 Glenn Wagner & Annie Liu
30-April, 3:45 Albert Wu & Jimmy Paolos
30-April, 4:30
30-April, 5:15 Robby Paolini & Mark McDuff