Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • L LEGO
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • René Søndergaard Nilsson
  • LEGO
  • Wiki
  • Lesson10

Lesson10 · Changes

Page history
Odometry authored May 28, 2015 by lildholdt's avatar lildholdt
Hide whitespace changes
Inline Side-by-side
Lesson10.markdown
View page @ 0e2e9ac0
...@@ -18,18 +18,37 @@ The plan is to follow the plan described in [1]. ...@@ -18,18 +18,37 @@ The plan is to follow the plan described in [1].
## Odometry ## Odometry
For this exercise the standard base vehicle from Lesson 6 is used together with the PilotSquare.java program provided in this lesson.
The parameters of the LEGO car in this program is defined as the following.
| Parameter | Value |
| ------------------------- |:---------------:|
| Left wheel diameter | 5.5 cm |
| Right wheel diameter | 5.5 cm |
| Track width | 16 cm |
The program makes the car drive 20 cm straight forward, turn 90 degrees to the left and repeat this 4 times in order to get back to the initial position.
A special piece of paper with multiple grids on it is used to measure the accuracy of the system. This is shown in the following image.
![Measuring physical accuracy of the DifferentialPilot class](https://gitlab.au.dk/rene2014/lego/raw/master/Lesson10/Images/Odometry.JPG) ![Measuring physical accuracy of the DifferentialPilot class](https://gitlab.au.dk/rene2014/lego/raw/master/Lesson10/Images/Odometry.JPG)
Optimally, the LEGO car should end up in the exact same position as prior to the execution of the program. However this is not the case due to both **systematic** and **non-systematic** errors.
The result of the 3 test runs are summarized in the following table.
| Attempt | Measured x | Measured y | Calculated x | Calculated y | | Attempt | Measured x | Measured y | Calculated x | Calculated y |
| -------- |:-------------:| -----------:| ------------:| ------------:| | -------- |:-------------:| -----------:| ------------:| ------------:|
| 1 | -2.00 mm | -2.00 mm | 1.00 mm | -1.60 mm | | 1 | -2.00 mm | -2.00 mm | 1.00 mm | -1.60 mm |
| 2 | -2.00 mm | 2.00 mm | 0.40 mm | -0.60 mm | | 2 | -2.00 mm | 2.00 mm | 0.40 mm | -0.60 mm |
| 3 | -4.00 mm | 3.50 mm | 2.50 mm | -1.90 mm | | 3 | -4.00 mm | 3.50 mm | 2.50 mm | -1.90 mm |
"Measured" x and y is the physical error measured by a ruler and "Calculated" x and y is computed error displayed in the LCD on the NXT.
The **Non-systematic** involves variations in the surface and the internal uncertainty of ~2% [2]. These errors are difficult to cope with. However the **systematic** errors involves incorrect definition of the LEGO car parameters and these can be corrected by calibration which is described in the following.
## Calibration of wheel diameter and the track width ## Calibration of wheel diameter and the track width
![Calibration of LEGO car paramters](https://gitlab.au.dk/rene2014/lego/raw/master/Lesson10/Images/Calibration.JPG)
#### Initial square run with calibrated values #### Initial square run with calibrated values
| Parameter | Value | | Parameter | Value |
...@@ -86,11 +105,23 @@ The plan is to follow the plan described in [1]. ...@@ -86,11 +105,23 @@ The plan is to follow the plan described in [1].
| Track width | 16.27 cm | | Track width | 16.27 cm |
## Position tracking by means of particle filters
Why this behavior?
Quantization error in tacho counter in each step of the trip.
Orientation of back wheel.
500 mm kørt distance. Afstand fra mål ~0.5 mm = dist_err = 0.001 500 mm kørt distance. Afstand fra mål ~0.5 mm = dist_err = 0.001
Rotation error ~0.5 degrees. 0.5/360 = 0,00138 Rotation error ~0.5 degrees. 0.5/360 = 0,00138
## Position tracking by means of particle filters
Hastighed ændret fra 5 til 15
Distance noise factor = 0.005
Angle noise factor = 2.5
## Conclusion ## Conclusion
...@@ -98,6 +129,7 @@ Rotation error ~0.5 degrees. 0.5/360 = 0,00138 ...@@ -98,6 +129,7 @@ Rotation error ~0.5 degrees. 0.5/360 = 0,00138
## References ## References
[1] http://legolab.cs.au.dk/DigitalControl.dir/NXT/Lesson10.dir/Lesson.html [1] http://legolab.cs.au.dk/DigitalControl.dir/NXT/Lesson10.dir/Lesson.html
[2] http://lejos.sourceforge.net/nxt/nxj/tutorial/WheeledVehicles/WheeledVehicles.htm
### Code ### Code
......
Clone repository
  • Lesson 1
  • Lesson 2
  • Lesson 3
  • Lesson 4
  • Lesson 5
  • Lesson 6
  • Lesson 7
  • Lesson 8 Journal 2
  • Lesson 8
  • Lesson 9
  • Lesson10
  • Lesson11
  • Home