Difference between revisions of "X Line Follower"
m |
|||
Line 7: | Line 7: | ||
'''Author(s):''' Costin Ionita, Aija Rusina <BR> | '''Author(s):''' Costin Ionita, Aija Rusina <BR> | ||
− | '''Country:''' Romania/Latvia <BR> | + | '''Country:''' Romania / Latvia <BR> |
'''Date:''' 11.07.2008 <BR> | '''Date:''' 11.07.2008 <BR> | ||
'''Activity:''' Robolution 2008 <BR> | '''Activity:''' Robolution 2008 <BR> |
Revision as of 13:06, 11 July 2008
Project: Line Follower
Overview
Author(s): Costin Ionita, Aija Rusina
Country: Romania / Latvia
Date: 11.07.2008
Activity: Robolution 2008
Requirements: Boe-Bot robot and QTI Line Following Kit
Abstract
Hardware Design: Our robot consists of a basic Boe-Bot to which we have attached a set of 3 IR sensors: 1-left, 1-center, 1-right.
Software Design: There is a main loop on which the robot analises its current state and tries to move on the direction of the line (Line Follower). The state is coded with three variables: qtiRight, qtiCenter and qtiLeft. 0 - white (robot doesn't sense anything), 1 - black (robot senses the line). There are three main cases:
1.
qtiCenter = 1 (the rest doesn't matter)
robot moves forward
2.
qtiCenter = 0, qtiLeft = 1
robot tries to search the line on the left side. If the line is found within a certain range the robot stops searching and continues moving forward.
3.
qtiCenter = 0, qtiRight = 1
robot tries to search the line on the right side. If the line is found within a certain range the robot stops searching and continues moving forward.
In case all three sensors "feel" 0, it means that the line is over or the curve is too steep. If the curve is too steep, the robot remembers the last change of direction and it tries to search to line in the same direction, otherwise it tries the opposite. If it's the end of the road, the robot uses a simple heuristic to find another line within a certain radius. It moves forward and serches both left and right. In no line is found it repeats this process for a number of times (2 in this case). After 2 steps, if no line is found the robot simply stops.
Project Files
Description | Download |
Project video | Media:XLFvideo.mpg |
Project sourcecode | Media:XLFcode.bs2 |