... | ... | @@ -47,7 +47,11 @@ The **Non-systematic** involves variations in the surface and the internal uncer |
|
|
|
|
|
## 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)
|
|
|
The wheels diameter is calibrated by letting the car drive 50 cm and then adjusting the diameter according to where the car stops. Similarly the track width is calibrated by letting the car spin 360 degrees and again observing the stopping position and adjusting the track width accordingly. The calibration setup is shown in the following image.
|
|
|
|
|
|
![Calibration of LEGO car parameters](https://gitlab.au.dk/rene2014/lego/raw/master/Lesson10/Images/Calibration.JPG)
|
|
|
|
|
|
The final parameter values are shown in the following table.
|
|
|
|
|
|
#### Initial square run with calibrated values
|
|
|
|
... | ... | @@ -57,6 +61,12 @@ The **Non-systematic** involves variations in the surface and the internal uncer |
|
|
| Right wheel diameter | 5.544 cm |
|
|
|
| Track width | 16.27 cm |
|
|
|
|
|
|
We found out that it was necessary to set the right wheel diameter a little higher than the left in order to make the LEGO car drive straight. The calibration is validated by letting the LEGO car drive in a 50 x 50 cm square as shown in following image.
|
|
|
|
|
|
![Validation of LEGO car parameters - Left turns](https://gitlab.au.dk/rene2014/lego/raw/master/Lesson10/Images/PilotSquareLeftTurns.JPG)
|
|
|
|
|
|
The result of 3 attempts are summarized in the following table.
|
|
|
|
|
|
|
|
|
| Attempt | Measured x | Measured y | Calculated x | Calculated y |
|
|
|
| -------- |:-------------:| -----------:| ------------:| ------------:|
|
... | ... | @@ -64,10 +74,8 @@ The **Non-systematic** involves variations in the surface and the internal uncer |
|
|
| 2 | -10.00 mm | -10.00 mm | 2.80 mm | -2.80 mm |
|
|
|
| 3 | -13.00 mm | -15.00 mm | 3.00 mm | -1.80 mm |
|
|
|
|
|
|
|
|
|
|
|
|
#### Tweaking parameters according to square run with left turns.
|
|
|
|
|
|
Despite what we expected the LEGO car did not end up the exact position as it started in. A clear sign of systematic errors is seen due to the x and y position always are negative.
|
|
|
We then tried to calibrate the parameters of the LEGO car according to the 50 x 50 cm square and ended up with the following parameters.
|
|
|
|
|
|
| Parameter | Value |
|
|
|
| ------------------------- |:---------------:|
|
... | ... | @@ -75,47 +83,42 @@ The **Non-systematic** involves variations in the surface and the internal uncer |
|
|
| Right wheel diameter | 5.544 cm |
|
|
|
| Track width | 16.4 cm |
|
|
|
|
|
|
5.595*0.99 = 5.539
|
|
|
5.6*0.99 = 5.544
|
|
|
|
|
|
Apparently, it was only the track width that needed to be adjusted in order to correct for the systematic errors. The result after four runs with the updated parameters is shown in the following table.
|
|
|
|
|
|
| Attempt | Measured x | Measured y | Calculated x | Calculated y |
|
|
|
| -------- |:-------------:| -----------:| ------------:| ------------:|
|
|
|
| 1 | 5.00 mm | 5.00 mm | 0.60 mm | -0.60 mm |
|
|
|
| 2 | -1.25 mm | 2.50 mm | 1.90 mm | -2.10 mm |
|
|
|
| 2 | -1.25 mm | -2.50 mm | 1.90 mm | -2.10 mm |
|
|
|
| 3 | 2.00 mm | 3.00 mm | 6.30 mm | -1.80 mm |
|
|
|
| 3 | -1.00 mm | 0.00 mm | 1.80 mm | -2.30 mm |
|
|
|
| 4 | -1.00 mm | 0.00 mm | 1.80 mm | -2.30 mm |
|
|
|
|
|
|
The measured x and y errors seem to be random with these parameters. To validate these results the car is programmed to drive the other way around as shown in the following image.
|
|
|
|
|
|
![Validation of LEGO car parameters - Right turns](https://gitlab.au.dk/rene2014/lego/raw/master/Lesson10/Images/PilotSquareRightTurns.JPG)
|
|
|
|
|
|
#### Reversed square with right turns
|
|
|
In this setup the LEGO car performed poorly with much larger errors in the x and y direction.
|
|
|
|
|
|
| Attempt | Measured x | Measured y | Calculated x | Calculated y |
|
|
|
| -------- |:-------------:| -----------:| ------------:| ------------:|
|
|
|
| 1 | 30.00 mm | 40.00 mm | 1.30 mm | 2.30 mm |
|
|
|
| 2 | -27.50 mm | -30.00 mm | 5.20 mm | 2.70 mm |
|
|
|
|
|
|
|
|
|
#### Final parameters
|
|
|
Due to these poor results the original calibrated parameter values are used.
|
|
|
|
|
|
| Parameter | Value |
|
|
|
| ------------------------- |:---------------:|
|
|
|
| Left wheel diameter | 5.539 cm |
|
|
|
| Right wheel diameter | 5.544 cm |
|
|
|
| Track width | 16.27 cm |
|
|
|
|
|
|
| Track width | 16.27 cm |
|
|
|
|
|
|
It seems like it is near impossible to calibrate the parameters so that the LEGO car is able to travel a given distance while performing a number of random turns. Multiple reason can cause this behavior. An obvious reason is the leJOS maximum precision of 2 %. So no matter how much calibration is performed some error will always exist. Other factors like the position of the back wheel could also be part of the explanation. If the back wheel is not aligned with the driving direction the car can be drawn out of course when pulling the back wheel into the correct direction.
|
|
|
|
|
|
Why this behavior?
|
|
|
## Position tracking by means of particle filters
|
|
|
|
|
|
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
|
|
|
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
|
... | ... | |