User Tools

Site Tools


marvin:ecp4

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
marvin:ecp4 [2009/01/29 09:11] devamarvin:ecp4 [2009/01/29 09:26] deva
Line 15: Line 15:
   * Move balance related code to a thread.   * Move balance related code to a thread.
   * Make control parameters writeable from outside the motor thread to make it possible to drive around.   * Make control parameters writeable from outside the motor thread to make it possible to drive around.
-  * Copy code from previous Behaviour project ([[http://wiki.aasimon.org/?id=marvin:lab8]]).+  * Copy code from previous Behaviour project (([[http://wiki.aasimon.org/?id=marvin:lab8|Lab 8]])).
   * Modify the code to make it fit Marvin.   * Modify the code to make it fit Marvin.
  
Line 24: Line 24:
  
 === Knowledge learned from previous lessons === === Knowledge learned from previous lessons ===
-Prior to using a sensor for a specific purpose it is important to investigate the main use for the sensor. For example in lab session 4 (([[http://wiki.aasimon.org/?id=marvin:lab4]])) we used the light-sensor as an input for measuring tilt of the robot. Or in other words, it was not the primary use for the sensor we used it for. Another example is the ultrasonic sensor (([[http://wiki.aasimon.org/?id=marvin:lab2]])) which operates fairly precise when operated at an angle of 90 degrees to the wall, because is uses echo for measurement. When the angle was shifted to one side the sensor became increasingly inaccurate. Again you have to closely investigate the capabilities and limitations of the sensor one plans to use. As the ultrasonic sensor depends on sound, the primary limitations are echo delays and angle shifts. Therefore the best readings will be available when the sensor is positioned directly in in front of a wall. And the best readings will also be available when to sensor is close to the wall due to the fact that echoes will travel in different directions. These limitations will not be a problem in our project due to the fact that we only use the ultrasonic sensor to avoid that Marvin will hit any walls.+Prior to using a sensor for a specific purpose it is important to investigate the main use for the sensor. For example in lab session 4 (([[http://wiki.aasimon.org/?id=marvin:lab4|Lab 4]])) we used the light-sensor as an input for measuring tilt of the robot. Or in other words, it was not the primary use for the sensor we used it for. Another example is the ultrasonic sensor (([[http://wiki.aasimon.org/?id=marvin:lab2|Lab 2]])) which operates fairly precise when operated at an angle of 90 degrees to the wall, because is uses echo for measurement. When the angle was shifted to one side the sensor became increasingly inaccurate. Again you have to closely investigate the capabilities and limitations of the sensor one plans to use. As the ultrasonic sensor depends on sound, the primary limitations are echo delays and angle shifts. Therefore the best readings will be available when the sensor is positioned directly in in front of a wall. And the best readings will also be available when to sensor is close to the wall due to the fact that echoes will travel in different directions. These limitations will not be a problem in our project due to the fact that we only use the ultrasonic sensor to avoid that Marvin will hit any walls.
  
 [[http://www.youtube.com/watch?v=1gR1UL5FbTQ|{{:marvin:p_lab3_bhv.jpg?255x210}}]] [[http://www.youtube.com/watch?v=1gR1UL5FbTQ|{{:marvin:p_lab3_bhv.jpg?255x210}}]]
Line 151: Line 151:
 </code> </code>
 ===The BTControl class=== ===The BTControl class===
-The thread handles BlueTooth communication in order to control Marvin with a remote control. The arrow keys on the computer is used instead of a remote. This class will be covered in detail in the next lab report.+The thread handles Bluetooth communication in order to control Marvin with a remote control. The arrow keys on the computer is used instead of a remote. This class will be covered in detail in the next lab report.
  
  
 The full source code for these classes can be found in the files ''Behavior.java'', ''RandomDrive.java'' and ''AvoidWall.java'' in the Marvin code tarball (([[http://wiki.aasimon.org/lib/exe/fetch.php?media=marvin:marvin-1.0.tar.gz|marvin-1.0.tar.gz]])) The full source code for these classes can be found in the files ''Behavior.java'', ''RandomDrive.java'' and ''AvoidWall.java'' in the Marvin code tarball (([[http://wiki.aasimon.org/lib/exe/fetch.php?media=marvin:marvin-1.0.tar.gz|marvin-1.0.tar.gz]]))
marvin/ecp4.txt · Last modified: 2009/01/29 11:00 by rieper