ECSE211-Lab 3 Localization Solved

30.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You'll get a download link with a: zip solution files instantly, after Payment

Securely Powered by: Secure Checkout

Description

5/5 - (1 vote)
  1. Design a system to localize the robot using ultrasonic and light sensors, where the robot should move to a known starting position.
  2. Evaluate the design and determine how well the system localizes the robot.

Design requirements

The following design requirements must be met:

  • The system must localize the robot to the origin of the tiles grid system.
  • Localization must use the ultrasonic sensor and, optionally, light sensors (see bonus).
  • The robot must localize approximately to the 0° direction using the ultrasonic sensor.
  • The robot must localize to the (1, 1) gridpoint and 0° using the ultrasonic/light sensor.
  • The robot must wait for input once completing angle localization and orienting to 0°.

 

 

Demonstration

The design must satisfy the requirements by completing the demonstration outlined below.

Design presentation

Before demoing the design, your group will be asked some questions for less than 5 minutes. You will present your design and answer questions designed to test your individual understanding of the lab concepts. Each person will be graded individually.

You must present your workflow, an overview of the hardware design, and an overview of the software functionality. Visualizing software with graphics such as flow charts is valuable.

Demonstration procedure

As shown in Figure 1,​ the robot is placed along the 45° line (thick dotted) inside the bottom-left tile of the 4×4 field grid. The brown-colored​ walls​ represent walls used for the ultrasonic localization.​ Please note that the robot could be placed in ANY ORIENTATION and​ POSITION​ along this 45° line. For example, Figure 2 shows another orientation and position of the robot’s starting position compared to that in Figure 1​ .​

 

Figure 1.  Robot’s Starting Orientation A.       Figure 2.  Robot’s Starting Orientation B.

 

 

Indicate to the TA what version of the ultrasonic localization you would like to use. Upon completing the angle localization,​ the robot should orient to its estimated 0° axis and the TA will measure the orientation error with respect to its true 0° axis. Note that you should have a stopping criterion to ensure that the robot stays still while the error angle is​ being measured (e.g. Button.waitForAnyPress()​ can be used to separate the two procedures).​

After the measurement is complete, the robot should then move to the (1, 1) point as shown in Figure 1 and Figure 2.​ Once ultrasonic/light localization is​ performed at this point, two error quantities are measured by the TA: the Euclidean distance error ϵ​ between the robot’s actual position (X​ ​F, Y​ ​F) and the (1, 1) point, and the orientation error​ ​ with respect to the 0° axis.​

​          ​

ε = √(XF)2 + (YF)2

Angle Localization

  • 5 points are​ given​ for orienting​ the​ robot​ on its 0° axis within an error tolerance of ±10°​. A penalty of 5 points per ±10° is​ used for angles beyond 10°. Hence, the following points are awarded for the actual robot’s orientation:
  • ± [0, 10] °5 points
  • ± (10, 20] ° 5 points
  • ± (20, ) ° 0 points

Ultrasonic Localization

  • 5 points are​ given​ for orienting​ the​ robot​ along its 0° axis at point (1, 1) within an error tolerance of ±5°.​ A penalty of 5 points per 5° ​is used for angles beyond 5°. Hence, the following points are awarded for the actual robot’s orientation:
  • ± [0, 5] °     →        5 points
  • ± (5, 10] ° →        5 points
  • ± (10, ∞) ° →        0 points

 

  • 10 points are​ given​ for reaching​ point (1, 1) within an error tolerance of 3 cm using a Euclidean distance​. A penalty of 5 points per 3 cm is​ used for distances beyond 3 cm. Hence, the following points are awarded for the actual robot’s position relative to the point (1, 1):
[0, 3] cm 10 points
(3  6] cm 5 points
(6, 9] cm 2.5 point

 

(9, ∞) cm 0 points
  • BONUS: Light Localization – are​ given​ for reaching​ point (1, 1) within an error tolerance of 2 cm using a Euclidean distance​. A penalty of 5 points per 2 cm is​ used for distances beyond 2 cm. Hence, the following points are awarded for the actual robot’s position relative to the point (1, 1):

 

[0, 2] cm 10 points
(2, 4] cm 5 points
(4, 6] cm 2.5 point
(6, ∞) cm 0 points

Provided materials

Sample code

No sample code is provided for this lab. Instead follow the guidelines given below:

  • Create a UltrasonicLocalizer​ class that performs the ultrasonic localization routine.​

 

  • Optional: Create a LightLocalizer​ class that performs the light localization routine.​

Implementation instructions

  1. Using the class definitions above, implement the ultrasonic localization versions.
    1. For more information see the tutorial provided.
  2. Using the class definition above, implement the localization routine(s).
  3. Create a main class that:
    1. First, corrects the angle of the robot and then waits for input by the user before moving to the grid intersection.
    2. Second (if you choose to do the bonus), your robot must pause after the angle localization and wait for user input before continuing to light localization.

 

Report Requirements

The following sections must be included in your report. Answer all questions in the lab report and copy them into your report. For more information, refer to

ECSE211SubmissionInstructions.pdf. Always provide justifications and explanations for all your answers.​

Section 1: Design Evaluation

You should concisely explain the overall design of your software and hardware. You must present your workflow, an overview of the hardware design, and an overview of the software functionality. You must briefly talk about your design choices before arriving at your final design. Visualizing hardware and software with graphics (i.e. flowcharts, class diagrams) must be shown.

Section 2: Test Data

This section describes what data must be collected to evaluate your design requirements. Collect the data using the methodology described below and present it in your report.

Test localization (​ 10 independent trials​)

  1. Place the robot in a tile corner along the 45° line (Figure 1​ )​ , where two walls are present.
  2. Choose a random orientation for the robot.
  3. Run the ultrasonic localization routine.
  4. Note the ultrasonic angle of the robot.
  5. Compute the ultrasonic angle error using the ultrasonic angle and the expected value.
  6. Continue the localization using the ultrasonic sensor to center at (1, 1) and 0°.
  7. Note the final position and final angle of the robot.
  8. Compute the Euclidean distance error​ and final angle error.​
  9. Report in a table: ultrasonic angle error, Euclidean distance error​ , and final angle error.​

Section 3: Test Analysis

For each test, compute the mean and standard deviation of the ultrasonic angle error, Euclidean​      distance error, and final angle error. Be sure to show general formulas and sample calculations.​

Section 4: Observations and Conclusions

  1. Describe other possible localization techniques and explain why you chose yours.
  2. Was the final angle impacted by the initial ultrasonic angle?
  3. What factors do you think contributed (positively and negatively) to the performance of your method?
  4. Do you think that the ultrasonic sensor or the light sensor method performs better? (If you did not do the bonus answer based on the reliability/quality of the readings of the light sensor vs. ultrasonic sensor). In future labs which one do you plan to use for navigating?

Section 5: Further Improvements

  1. Propose a software or hardware way to minimize errors in the ultrasonic sensor.
  2. Propose another form of localization.
  3. Discuss how and when light localization could be used outside of the corner to correct Odometry errors, e.g. having navigated to the middle of a larger floor.
  4. How could the robot quickly localize given two light sensors?
  • Lab3-kpg5w4.zip