$30.99
Design objectives
Design a system that allows the robot to drive to a specified set of coordinates, known as waypoints.
Implement the design using previous implementations of the Odometer.
Evaluate the design and ensure it can navigate effectively around a field.
Design requirements
The following design requirements must be met:
The robot must navigate through a series of specified points using the minimal distance.
A list of waypoints must be provided in one location in the code.
The robot must use the grid system found on the play floor, where the origin is the starting corner of a tile.
Waypoints will be given with respect to the tile grid system. For example, (1, 0) will be located
30.48 cm to the right of the origin (0, 0).
When turning to a waypoint, the robot must use the minimal angle needed to turn to it.
Demonstration
The design must satisfy the requirements by completing the demonstration outlined below.
Design presentation (10 points)
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.
Simple Navigation
Your robot will be placed in a corner of the playing field with walls, exactly as in the previous lab. Once again, your robot should localize and navigate to (1, 1). From that point on the 4x4 tile grid, the robot must travel through 5 waypoints. The TA will specify the waypoints during the demo (see FAQ). You will add them to your code and upload your solution to the robot. An example is shown below in Figure 1 using a minimal angle needed to turn at each waypoint. A maximal angle turn must be avoided (see FAQ).
**It is highly recommended that the robot localizes every few waypoints (at least twice), both to increase accuracy and to help in preparation for the final project**
10 points are given for turning using a minimal angle (marked in green in Figure 1) at all the waypoints. 0 points are given if the robot turns using a maximal angle (marked in red in Figure 1) at any of the 5 waypoints.
10 points are given for reaching the last waypoint within an error tolerance of 3 cm using a Euclidean distance measure. The Euclidean distance error ϵ is defined by the formula shown below, where XD and YD represent the destination waypoint, and XF and YF represent the final position of the robot. Penalties are defined below.
𝜖=√(𝑋𝐷−𝑋𝐹)2+(𝑌𝐷−𝑌𝐹)2
BONUS: Simple Navigation on larger area
10 bonus points will be awarded if the robot, starting from the (1, 1) point on the 8x8 tile grid, can reach the last waypoint within an error tolerance of 3 cm using a Euclidean distance measure.
The following point grid for navigation is used:
▪ [0, 3] cm → 10 points
▪ (4, 6] cm → 5 points
▪ (6, ∞) cm → 0 points
Figure 1: Example robot path 1 (labelled)
Provided materials
Sample code
No sample code is provided for this lab. Instead, follow the guidelines given below. Create a Navigation class that has at least the following methods:
travelTo(double x, double y)
This method causes the robot to travel to the absolute field location (x, y), specified in tile points. This method should continuously call turnTo(double theta) and then set the motor speed to forward (straight). This will make sure that your heading is updated until you reach your exact goal. This method will use the odometer.
turnTo(double theta)
This method causes the robot to turn (on point) to the absolute heading theta. This method should turn a MINIMAL angle to its target.
Physical material
In the lab, there will be floors with the grid available.
Implementation instructions
Adjust the parameters of your controller, if any, to minimize the distance between the desired destination and the final position of the robot. Simultaneously, you should aim to minimize the number of oscillations made by the robot around its destination before stopping.
Write a program to travel through a set of waypoints. For example, Figure 2 shown below follows (3, 2), (2, 2), (2, 3), and (3, 1) in order.
Figure 2: Example robot path 1.
Section 1: Design Evaluation
You should concisely explain the overall design of your software and hardware. You must present: (1) your workflow (2) an overview of the hardware design (3) 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 for workflow and software, and pictures for hardware) 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 in a formatted table.
Navigation test (8 independent trials)
Program the robot to travel to waypoints (3, 2), (2, 2), (2, 3), and (3, 1) as in Figure 2.
Note down the destination waypoint (XD,YD) in cm.
Place the robot on the origin of a grid tile.
Ensure there are no obstacles in the robot’s path.
Run the program to drive the robot through the waypoints specified in Step 1.
Record (XF,YF) which is the final position of the robot.
Section 3: Test Analysis
Compute the Euclidean error distance ϵ between (XF,YF) and (XD,YD) for each trial in a table.
Compute the mean and sample standard deviation for error ϵ computed in the Navigation test. Be sure to use the show general formulas and sample calculations.
Section 4: Observations and Conclusions
Answer the following questions:
Are the errors you observed due to the odometer or navigator? What are the main sources?
How accurately does the navigation controller move the robot to its destination?
At which waypoints did you decide to localize and why? What are the advantages and disadvantages to localizing at every waypoint?
Section 5: Further Improvements
What steps can be taken to reduce the errors you discussed above? Identify at least one hardware
and one software solution. Provide explanations as to why they would work.
Frequently asked questions (FAQ)
What is a minimal angle?
What is meant by “design presentation”?
Which maps will be used for this lab’s simple navigation demo?
Map 1:
Map 2:,
Map 3:
Map 4:
Figure 3: Simple navigation maps
Which maps will be used for this lab’s bonus navigation demo?
Figure 4: Bonus navigation maps
You must encode all these maps in your code, so you can easily select the correct map to use at demo time.
How do I test my logic on my computer before running it on the brick?
Why do I need to test my logic on my computer before running it on the brick?