... | ... | @@ -40,6 +40,8 @@ We then ran the pilotSquare code, and as Picture 2 and video 1 shows, in every t |
|
|
##### Picture 2:first test of pilotSquare - comparing start and finishning position
|
|
|
|
|
|
--------------------------------Video 1 [google drive videor - first test]
|
|
|
[![image alt text](http://img.youtube.com/vi/YXYJeJoolCM/0.jpg)](http://www.youtube.com/watch?v=YXYJeJoolCM)
|
|
|
##### Video 1: google drive video - first
|
|
|
|
|
|
As seen in the video and Pictureture above, the cars final position is approximately 4 cm to left and 1 cm above the start position. To make the vehicle start and stop at the same position we changed the variables wheel diameter and track width.
|
|
|
|
... | ... | @@ -167,9 +169,12 @@ A simple solution would be to use a sequantial loop if we know the position of t |
|
|
LCD.drawString("Closing",0,0);
|
|
|
}
|
|
|
|
|
|
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.
|
|
|
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
|
|
|
|
|
|
------------------An example can be seen in video 3.
|
|
|
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.
|
|
|
|
|
|
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.
|
|
|
|
... | ... | |