A robot designed to follow a line using the Mindsensors Line Leader Sensor for Primary Navigation


Lego Mindstorms NXT with Mindsensors Line Leader Sensor

Pathbot is a robot designed to follow a black line (electrical tape) around a controlled area and explore the programming challenges associated with following a line.  It is also a platform for exploring possibilities where line following is part of a bigger challenge – Like following a line to a target location, avoiding obstacles, and making decisions along the way.

The robot was a test platform for beta-testing the Mindsensors-Line Leader sensor as well.


  • Follow a line consistently around a closed track for a period of time.
    • Introduce different diameter curves and angles to test the robot’s ability to stay on course.
  • Navigate gaps in the line.
    • Make decisions about whether to continue forward over a gap.
    • Make decisions about turning around if a line ends.
  • Navigate a fork in the road.
    • If there are two choices for navigation, is there a way to put a marker in the path and have the robot make decisions about which way to go?
  • Avoid obstacles in the path of the robot to allow it to complete its mission.
  • Identify the end of the path to a target location – and start a new mission.
    • Can the robot identify an end point or marker that indicates the end of line following and beginning of a new challenge?


The robot base is a standard differential drive robot with no special modifications.  I find this type of robot is well suited for generic testing.  It is flexible to work with, and offers a super tight turning radius (spin) that works great for following a line.


Mindsensors – Line Leader

The Pathbot employs a Mindsensors-Line Leader sensor as a primary means for following a line.  This sensor gives the robot a distinct advantage by having essentially eight light sensors in one specialized package designed for following lines.  There are many other ways to implement line following with one, two, three or more Lego light sensors, but this low-cost, effective sensor makes life a whole lot easier and efficient.



Pathbot is programmed using my behavior-based framework where several behaviors were created to manage various scenarios.


  • Follow a Line
  • Marker Decision
  • End Point Decision
  • Gap Decision

The programming seems to have been successful and the robot was successful in performing basic tasks.  More work is necessary to upload code and findings for each challenge.

Read more detailed articles to learn more about PathBot: Here

Line Following Experiments and Code

Version Description Download the Code
Coming soon…  
  1. Maxime
    December 21, 2011 at 3:03 pm


    When will there be some example code available?


  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: