$30.99
Design objectives
Design a system to localize the robot using ultrasonic and light sensors, where the robot should move to a known starting position.
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 4x4 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 - (10 points) 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.
Physical material
In the lab, tiles with grids will be provided which will have walls for localization.
Implementation instructions
Using the class definitions above, implement the ultrasonic localization versions.For more information see the tutorial provided.
Using the class definition above, implement the localization routine(s).
Create a main class that:First, corrects the angle of the robot and then waits for input by the user before moving to the grid intersection.
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)
Place the robot in a tile corner along the 45° line (Figure 1 ) , where two walls are present.
Choose a random orientation for the robot.
Run the ultrasonic localization routine.
Note the ultrasonic angle of the robot.
Compute the ultrasonic angle error using the ultrasonic angle and the expected value.
Continue the localization using the ultrasonic sensor to center at (1, 1) and 0°.
Note the final position and final angle of the robot.
Compute the Euclidean distance error and final angle error.
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
Describe other possible localization techniques and explain why you chose yours.
Was the final angle impacted by the initial ultrasonic angle?
What factors do you think contributed (positively and negatively) to the performance of your method?
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
Propose a software or hardware way to minimize errors in the ultrasonic sensor.
Propose another form of localization.
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.
How could the robot quickly localize given two light sensors?
Frequently asked questions (FAQ)
Do I need to implement my robot’s localization routines using the same 0° axis shown in Figure 1 and Figure 2 (that is, along +y axis)?
Do I need to move to another position within the angle localization procedure? No, you should only rotate about your starting position. Once the orientation error in part 1 is measured, the robot should then move to the (1, 1) point for ultrasonic localization .
What is meant by “design presentation”?
Before a lab demo, you and your partner will briefly present your design. This can include a basic visualization of how your code functions, such as a flow chart. You will then be asked a series of questions. These could be related to the lab tutorial and the initial lab code. For this part, a grade of 10 signifies full understanding, 5 signifies satisfactory understanding, while 0 shows no understanding at all. Note that memorized answers are discouraged and both partners should be responsible for understanding the design and their associated code, even if one of them did not write all of it.