mandag den 13. september 2010

Week 2 in LEGO Lab

Date: 9/9-2010
Duration of activity: 3 hours
Group members participating: Michael Vilhelmsen, Mads Møller, Heine Stokholm

  • The goal was to investigate the NXT ultrasonic sensor and use it to build and program a wall follower robot.
  • The plan was: Modify out existing robot (equip it with the NXT ultrasonic sensor), upload the  SonicSensorTest.java program, modify the sample interval, examine the limitations of the NXT ultrasonic sensor, upload the Tracker.java program, edit the constants in the Tracker.java and observe the effect and finally upload the WallFollower program and study the control algorithm.
  • The result were as follows:






    • We equipped our robot with the NXT ultrasonic sensor seen below:












    • We uploaded the SonicSensorTest program. The sample interval was initially set to 300 msec. We changed this value to 10 msec, observed that the sampling happened faster, but the display did not update every 10 msec, which was hardly surprising. The update was probably happening every 100 msec, and realisticly, so did the sampling.
    • We aimed the NXT ultrasonic sensor at a wall and observed the distance displayed on the display. We moved the sensor further and further away from the wall, trying to get it to output 254 on the display. This never happened, the highest reading we could possibly get was 179. See the conclusion for a discussion about this.
    • We uploaded the Tracker program, placed the robot approx. 50 cm. from a wall and ran the program. We observed that the robot approached the wall, then backed up a bit, and then settled for a rhytmic forward-backward motion, but never came to a halt. We tweaked the constants in the program, and the results will be discussed in the conclusion. but lets just say that the only time our robot actually came to a halt, was when the battery died...
    • Lastly, we uploaded the WallFollower program, and tried to make it follow a line, including taking corners. We spent the rest of time messing around with this. The results can the seen in the conclusion.
  • The conclusions are as follows;
    • The SonicSensorTest never displayed a value higher than 179. This was most likely caused by the fact that the ultrasounds the NXT ultrasonic sensor sends out, are sent out, not in flat waves, but in a cone. The cone may thus have hit either the ground or the ceiling or some other surface, and bounced back, before the "middle" of the cone hit whatever was in front of it. The speed of sound could also have been a limiting factor, but at 343 m/sec, and the NXT ultrasonic sensor having a supposed maximum distance of 2.55 meters, this seems unlikely. Even with the sound having to travel back to the NXT ultrasonic senso, the maximum distance is 2.55x2 = 3.10 meters, which then takes 3.10 / 343 = 0.009 seconds to travel.
      • The Tracker program uses a Proportional-Derivative control. At first, we used the program as it was, and saw that the robot did indeed move faster towards the wall, when it was further away from it. It never came to a halt though. We tweaked around with the constants, and the most notable effect was when we set the minimum speed to 100%. The result was much like figure 5.13 in our book.
      • WallFollower -
    All in all this lab session was pretty easily done, and the results were hardly surprising to anyone.

    Ingen kommentarer:

    Send en kommentar