- The RWTH Mindstorms NXT Toolbox for matlab is installed correctly and you could connect to NXT within matlab using bluetooth without any error.
- All sensors and motors are connected to the same ports as in the building instruction.
- The ultrasonic sensor is facing to the right. I define this as the default starting position.
- You have enough space (at least 2 by 2 meter) for NXTCamel to run.
>> checksystem
Make sure the ultrasonic sensor faces to the right side before you start.
========Now test driving system========
Drive forward for 3 second. Press any key to start...
Drive backward for 3 second. Press any key to start...
Turn left. Press any key to start...
Turn right. Press any key to start...
Back and turn. Press any key to start...
Back and turn to the other direction. Press any key to start...
========Driving system test finished========
========Now test the sonar system========
Sweep sonar and measure the distance. Press any key to start...
========Sonar test finished========
Light intensity is 42.3%
========All test finished========
Make sure the ultrasonic sensor faces to the right side before you start.
========Now test driving system========
Drive forward for 3 second. Press any key to start...
Drive backward for 3 second. Press any key to start...
Turn left. Press any key to start...
Turn right. Press any key to start...
Back and turn. Press any key to start...
Back and turn to the other direction. Press any key to start...
========Driving system test finished========
========Now test the sonar system========
Sweep sonar and measure the distance. Press any key to start...
========Sonar test finished========
Light intensity is 42.3%
========All test finished========
It will also plot the distance measured by the ultrasonic sensor in a polar plot like this:
Note that the NXTCamel by definition is always facing the 90 degree (12 o'clock) direction. The number 100, 200, 300 in the plot is the distance in centimeter. I measured 10 points here. One could in principle sample more points and get a better representation of the surrounding environment though it will be slower.
This distance information is naive compared with those from Google car. Nevertheless it is enough to let NXTCamel drive without hitting obstacles.
Update:
Here is an example with a simple algorithm, and I am sure there is still lot of space for improvement. Please let me know if you get a better way.
Update:
Here is an example with a simple algorithm, and I am sure there is still lot of space for improvement. Please let me know if you get a better way.
No comments:
Post a Comment