![]() |
![]() |
Professional
Microsoft Robotics Developer Studio
Line Following is commonly used to teach basic robotics and also in various robotics competitions. It is a fairly basic task that is usually done using light sensors or IR sensors.
To create a "floorplan" with a line to be followed requires some tricks in the Simulator. A Line Mesh program was developed for this chapter that takes a bitmap image as input and creates a mesh that can be used on the ground in the Simulator. In addition, Simulated Photo Cells were created using simulated Webcams and attached to an iRobot Create.
There is an alternative approach using the Maze Simulator which is explained in the Line Following section in Chapter 9. However, this only shows you how to create a floorplan using the Maze Simulator, it does not provide a Line Following service. You would have to use the Webcam on the Pioneer robot to locate and follow the line.
The following is a screenshot of an iRobot Create following a line:
The line following behavior is actually quite poor. The robot frequently leaves the line, especially at corners. You can work on the algorithm to try to make it more reliable.
The line is also very wide, but this does not really matter because it is the principle that is important. If you change the width of the line, you will have to move the simulated photo cells on the robot too.