Duration of activity: 5
Group members participating: Alexander Rasmussen, Søren Ditlev
Goal:
To experiment with localization and navigation using differential driven car.
Plan:
According to Brian Bagnall[] we plan to construct a car that navigates using cartesian coordinates and the NXT tacho counter. Attaching marker in font base of the car would make the cars route visible and thus make it easy examine and compare different routs, this process is described by Toto[] .
Picture of Car. Here you see how measurement of the track width and the attachment of the marker.
Results:
Brian Bagnall Experiment
In this session we will apply the tacho counter of the NXT motor to keep track of the position and direction of a LEGO car with differential drive where two motors are used independently to move and steer the car. The software for controlling the car will be implemented in accordance with the guide on Controlling Wheeled Vehicles[]
public class NavBot {
DifferentialPilot difPilot = new DifferentialPilot(5.5f, 17.5f, Motor.C, Motor.B);
Navigator navigator = new Navigator(difPilot);
public static void main(String[] args){
Button.waitForAnyPress();
NavBot navBot = new NavBot();
navBot.go();
}
int size = 5;
public void go(){
//Brian Bagnalls route run 3 times
for (int i = 0; i < 3; i++) {
navigator.goTo(200/size, 0);
navigator.waitForStop();
navigator.goTo(100/size, 100/size);
navigator.waitForStop();
navigator.goTo(100/size, -50/size);
navigator.waitForStop();
navigator.goTo(0, 0);
}
}
First test we did, were without any initial measuring of the car instead we used the track width and wheel diameter that were used by Brian Bagnall. For every test we did the path was repeated 3 times, to get a better idea of the inaccuracy that the system might had.
Picture of the initial run:
After the first run we calibrated the system by using measurements that we measured on the car and tried to run the system again. This resulted in the car turning in too little an angle an the car driving of the course. The fact that the actual measurements didn’t make the turning curve more precise was a bit unexpected. In the first run we had a track width of 16 but the measured width was actually 14, so the fact that we decreased the width made the car more inaccurate. Therefore we instead increased the track width slowly, and found it to be best 17.5cm. We also experimented with the wheel diameter how that would affect the accuracy of the car. We found that if you increase the wheel diameter the car will turn more sharply whereas decreasing would have the reverse effect. The most accurate wheel diameter seemed to be around 5.6 cm which is also actual diameter of the wheel.
Run width track width 17.5:
and Wheel diameter of 5.6
The fact that we were not able to get a more accurate run may be do to poor calibration or that the car slipped on the maybe too smooth surface on the whiteboard that we used for testing.
Distance vs. Turning
To investigate Brian Bagnalls claim that the blighbot does a good job measuring distances, but lacks accuracy when turning. We measured the lines of one of the runs, and found that at the lines were almost completely the same length, only vary a centimeter or two per run, this supports Bagnalls claim. The lack of turning accuracy may be due to poor calibration from our side, as mentioned above the car performed better with a track width longer than what we measured, and therefore it is hard to figure out what calibration will suit the system best.
Picture of measurement of distances:
Avoiding obstacles
We didn’t get to implement this solution into our system, but a way it could have been done is to use a ultrasonic sensor to detect any obstacle on the route. If an obstacle is detected the car will try to avoid it by eg. backing up, turning and try to go around, the tachocounter or navigator class should be able to still figure out the locations of the car and return to its route after avoiding the obstacle.
For this approach to work properly, the system must have a very good calibration otherwise it won't be able to figure out its position and may not find its way back to its original path after avoiding an obstacle.
Improved Navigation
We did not have time to do this part of the assignment.
Conclusion:
We were able to redo Brian Bagnalls test to see how the tacchocunter works and what weaknesses it may have.
Ingen kommentarer:
Send en kommentar