... | ... | @@ -2,7 +2,7 @@ |
|
|
|
|
|
## Lab Notebook 10
|
|
|
|
|
|
**Date:** 28/05 2015.
|
|
|
**Date:** 02/06 2015.
|
|
|
|
|
|
**Group members participating:** Tine Hansen, Daniel Moltzen, Mads Eriksen, Lars Høeg.
|
|
|
|
... | ... | @@ -23,18 +23,18 @@ The goal for this exercise is to determine whether the premade variables are pre |
|
|
We intend to do this by following the suggestions described in the assignment for week 10[1]. Hence, use the travel() to make the legocar travel 50 cm and see how it works out in a physical test. To test the Track width, we make the legocar rotate 180 and see if it ends up in the same position as where it started.
|
|
|
|
|
|
## Experiments with pilotSquare:
|
|
|
When testing the pilotSquare[pilotSquare kode fra hjemmesiden] we wanted to see if the legocar would start and stop in the same place. We tested this three times where the start position of the legocar where the same. The variables wheel diameter and track width were not changed and therefore had the values:
|
|
|
When testing the pilotSquare[2] we wanted to see if the legocar would start and stop in the same place. We tested this three times where the start position of the legocar where the same. The variables wheel diameter and track width were not changed and therefore had the values:
|
|
|
|
|
|
- Wheel diameter: 5.5
|
|
|
- Track width: 16
|
|
|
|
|
|
To know the exact starting and finishing point we attached two “pointers to the legocar” [Picture 1]. One on the left front and one i the center of the back. When placing the Legocar car at the starting position on a white paper we marked the two points with a pen where the two pointers pointed down on the paper.
|
|
|
To know the exact starting and finishing point we attached two “pointers to the legocar” as seen in picture 1. One on the left front and one i the center of the back. When placing the Legocar car at the starting position on a white paper we marked the two points with a pen where the two pointers pointed down on the paper.
|
|
|
|
|
|
|
|
|
![touchingpoint](http://gitlab.au.dk/uploads/u4099/legolabtimadala/5aa360bab7/touchingpoint.jpg)
|
|
|
##### Picture 1: the two blue legobricks are used as a pointer that point down towards the white paper. Then two dots are added beneath them to know the exact start position. The finishing position is then recorded by drawing dots beneath the two pointers.
|
|
|
|
|
|
We then ran the pilotSquare code, and as Picture 2 and video 1 shows, in every tested instance, the start and finish position where not the same. Although, the final position where almost identically in each of the tests.
|
|
|
We then ran the pilotSquare code, and as Picture 2 and Video 1 shows, in every tested instance, the start and finish position where not the same. Although, the final position where almost identically in each of the tests.
|
|
|
|
|
|
![test1 with pilotsquare (1)](http://gitlab.au.dk/uploads/u4099/legolabtimadala/98b56f1afd/test1_with_pilotsquare__1_.png)
|
|
|
##### Picture 2:first test of pilotSquare - comparing start and finishning position
|
... | ... | @@ -69,7 +69,12 @@ We believe that these results are as close as we can get to a matching starting |
|
|
|
|
|
|
|
|
## Experiments with non-systematic odometry error model
|
|
|
In this experiment, we will work with the pilotMonitor program[pilotmonitor program] to investigate if the non-systematic odometry error model also models the errors of the base vehicle driven in a route of travel and rotate steps. To do this, we tested the program with the following code and see how it corresponds to the GUI that the PilotMonitor outputs:
|
|
|
|
|
|
## Goal
|
|
|
In this experiment, we will work with the pilotMonitor program[3] to investigate if the non-systematic odometry error model also models the errors of the base vehicle driven in a route of travel and rotate steps.
|
|
|
|
|
|
## Plan
|
|
|
To do this, we tested the program with the following code and see how it corresponds to the GUI that the PilotMonitor outputs:
|
|
|
|
|
|
public void go()
|
|
|
{
|
... | ... | @@ -94,32 +99,32 @@ In the test we used the variables for trackwidth and wheeldiameter that we found |
|
|
- Private float distanceNoiseFactor = 0.2f; //0.2f;
|
|
|
- Private float angleNoiseFactor = 4; //4f;
|
|
|
|
|
|
For executing the test, we drew a starting position and the calculated finishing position on a blackboard Picture4. Hereafter, we drove the testprogram and compared the modelled errors with the finishing position. Our main goal was to investigate if the distanceNoiseFactor and angleNoiseFactor did model the error correctly, or if we had to change the values to make the model fit.
|
|
|
For executing the test, we drew a starting position and the calculated finishing position on a blackboard Picture 4. Hereafter, we drove the testprogram and compared the modelled errors with the finishing position. Our main goal was to investigate if the distanceNoiseFactor and angleNoiseFactor did model the error correctly, or if we had to change the values to make the model fit.
|
|
|
|
|
|
![FullSizeRender](http://gitlab.au.dk/uploads/u4099/legolabtimadala/c1d20f7e46/FullSizeRender.jpg)
|
|
|
##### Picture 4: The track where we tested the PilotRoute. Start posiotion is on the black line above where it says 18 cm. the center of the wheels should then be aligned with black line to get a correct starting position.
|
|
|
##### Picture 4: The track where we tested the PilotRoute[4]. Start position is on the black line above where it says 18 cm. the center of the wheels should then be aligned with black line to get a correct starting position.
|
|
|
|
|
|
In the video beneath, we can see how the test i executed. The reason why the length of the final travelling distance is 45 and not 36(which is the distance set in the code) is that the legocars center point is positioned 9 cm to the left of the 50 cm line on start position. The reason to this is that it lets us know the precise start and finishing position.
|
|
|
|
|
|
We tested and compared the PilotMonitor GUI-output with the PilotRoute 4 times. The results can be seen in Picture 5.
|
|
|
|
|
|
![samlet testresultater (1)](http://gitlab.au.dk/uploads/u4099/legolabtimadala/498e6c104e/samlet_testresultater__1_.png)
|
|
|
##### Picture 5: test 1-4 showing each test with the result for the PilotMonitor and the observed testresult with PilotRoute.
|
|
|
##### Picture 5: test 1-4 showing each test with the result for the PilotMonitor and the observed test result with PilotRoute.
|
|
|
|
|
|
We then took each instance of the finishing position and plotted it in a graph [Picture 6], and compared the result to each of the calculated error-models. The results shows that the points on the non-systematic odometry error model varies more and farther away from the expected end position than our test results show.
|
|
|
We then took each instance of the finishing position and plotted it in a graph as seen in picture 6, and compared the result to each of the calculated error-models. The results shows that the points on the non-systematic odometry error model varies more and farther away from the expected end position than our test results show.
|
|
|
|
|
|
![samlet samlet test fra pilotroute](http://gitlab.au.dk/uploads/u4099/legolabtimadala/3f6f379061/samlet_samlet_test_fra_pilotroute.png)
|
|
|
##### Picture 6: Each test result from the PilotRoute plotted on the same graph
|
|
|
|
|
|
By investigating the odometry error model and compare it with real tests, it seems that the distance and angle noise factors are to high and cause some wrong results that are too far away from the expected finishing position. At least when compared to our results dePictureted in Picture 6.
|
|
|
|
|
|
To reach some noise factors that could give a more accurate error modelling, we tried to adjust the model according to our investigation as well as creating more turns and a longer travel distance on the test track (Picture 7). We also tried to adjust the distanceNoiseFactor and angleNoiseFactor to, private float distanceNoiseFactor = 0.3f; //0.2f and private float angleNoiseFactor = 1; //4f, to minimize the extent of the error calculated by PilotMonitor.
|
|
|
To reach some noise factors that could give a more accurate error modelling, we tried to adjust the model according to our investigation as well as creating more turns and a longer travel distance on the test track as seen in picture 7. We also tried to adjust the distanceNoiseFactor and angleNoiseFactor to, private float distanceNoiseFactor = 0.3f; //0.2f and private float angleNoiseFactor = 1; //4f, to minimize the extent of the error calculated by PilotMonitor.
|
|
|
|
|
|
![FullSizeRender (1)](http://gitlab.au.dk/uploads/u4099/legolabtimadala/b478c4bc2a/FullSizeRender__1_.jpg)
|
|
|
##### Picture 7: new track where we used the following code to complete the track: travel(50);rotate(-90);travel(29);rotate(90);travel(18);rotate(90);travel(36);.
|
|
|
|
|
|
We then ran 5 tests were the final position where almost the same every time: 5 cm below and 1.5-2 cm to the left(Picture 8). This could be a manual error when drawing the circuit on the blackboard, which is likely since the results are so much a like. Even though
|
|
|
that the extent of the error illustrated by the PilotMonitor-pogram was difficult to compare to our observations, due to a missing scale on the GUI, we believe that these variables corresponded well to the finishing position we observed after multiple runs.
|
|
|
We then ran 5 tests were the final position where almost the same every time: 5 cm below and 1.5-2 cm to the left as seen in picture 8. This could be a manual error when drawing the circuit on the blackboard, which is likely since the results are so much a like. Even though
|
|
|
that the extent of the error illustrated by the PilotMonitor-program was difficult to compare to our observations, due to a missing scale on the GUI, we believe that these variables corresponded well to the finishing position we observed after multiple runs.
|
|
|
|
|
|
![Untitled drawing](http://gitlab.au.dk/uploads/u4099/legolabtimadala/74df235885/Untitled_drawing.png)
|
|
|
##### Picture 8: Showing our results after 5 tests with new route.
|
... | ... | @@ -129,7 +134,7 @@ In this exercise we investigate how we can track the position of a vehicle movin |
|
|
|
|
|
The legocar has same physical design as in the experiments described above.
|
|
|
|
|
|
A simple solution would be to use a sequantial loop if we know the position of the obstacle. Such a solution could be like this where we use a predetermined route[PilotAvoid]:
|
|
|
A simple solution would be to use a sequential loop if we know the position of the obstacle. Such a solution could be like this where we use a predetermined route[5]:
|
|
|
|
|
|
|
|
|
public void go()
|
... | ... | @@ -173,11 +178,11 @@ The result can be seen in [video 2] |
|
|
[![image alt text](http://img.youtube.com/vi/V6QkYkc6bRk/0.jpg)](http://www.youtube.com/watch?v=V6QkYkc6bRk)
|
|
|
##### Video 2: Sequential avoid of of obstacles
|
|
|
|
|
|
But what if we do not know of the location of the obstacle and we still want to be able to avoid it and endour route in our predetermined finishing position. To do this, we use the odometryPoseProvider, which attaches itself to the differential pilot as a listener, which means we can get the pose of the legocar by calling getPose(). We then use this to calculate a new route to our destination when we have avoided an obstacle.
|
|
|
But what if we do not know of the location of the obstacle and we still want to be able to avoid it and endour route in our predetermined finishing position. To do this, we use the odometryPoseProvider, which attaches itself to the differential pilot as a listener, which means we can get the pose of the legocar by calling getPose(). We then use this to calculate a new route to our destination when we have avoided an obstacle[6].
|
|
|
|
|
|
Although this helps us eliminate the problem of unknown obstacles, others still exist. For instance if the robot encounters an obstacle close to the finishing position, then it will have trouble navigating around it. Furthermore, the first obstacle the robot reaches triggers the updateRoute(), which cause the robot to take the fastest way to its end position. If it on its way encounters another obstacle, it has no way to drive around it and therefore just continue driving towards it. Finally, this code only knows how to get to the finishing position as fast as possible. If we want it to navigate around obstacles but still through specific positions on a map, then we have to do this in another way.
|
|
|
|
|
|
One way to solve some of these problems is to let the robot locate the distance to obstacles around it or create an array with positions we want it to navigate through before it reaches it’s final destination.
|
|
|
One way to solve some of these problems is to let the robot locate the distance to obstacles around it or create an array with positions we want it to navigate through before it reaches it’s final destination[7].
|
|
|
|
|
|
We tried to do this by using the code snippets beneath but without any succes:
|
|
|
|
... | ... | @@ -267,11 +272,27 @@ We tried to create a solution, that could follow multiple position and still be |
|
|
|
|
|
1. [http://legolab.cs.au.dk/DigitalControl.dir/NXT/Lesson10.dir/Lesson.html]
|
|
|
|
|
|
2. PilotSquare - [https://www.dropbox.com/s/2a128ff9acz7iik/PilotSquare.java?dl=0]
|
|
|
|
|
|
3. PilotMonitor - [https://www.dropbox.com/s/pg0woiiq90dumcu/PilotMonitor.java?dl=0]
|
|
|
|
|
|
4. PilotRoute - [https://www.dropbox.com/s/q9oeanwfmvi9qmh/PilotRoute.java?dl=0]
|
|
|
|
|
|
5. PilotAvoid - [https://www.dropbox.com/s/uwbzk0wo6v6w94a/PilotAvoid.java?dl=0]
|
|
|
|
|
|
6. ObstacleAvoider - [https://www.dropbox.com/s/o7xmngodgclhqje/obstacleAvoider.java?dl=0]
|
|
|
|
|
|
7. WayFinder - [https://www.dropbox.com/s/00wwagh2r2t5hm0/wayFinder.java?dl=0]
|
|
|
|
|
|
**Video**
|
|
|
|
|
|
Video 1:[http://www.youtube.com/watch?v=YXYJeJoolCM]
|
|
|
Video 1: [http://www.youtube.com/watch?v=YXYJeJoolCM]
|
|
|
|
|
|
Video 2: [http://www.youtube.com/watch?v=V6QkYkc6bRk]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Video 2:[http://www.youtube.com/watch?v=V6QkYkc6bRk]
|
|
|
|
|
|
|
|
|
|
... | ... | |