<< return to Pixycam.com

User Tools

Site Tools


wiki:v2:line_quickstart

**This is an old revision of the document!**

Line tracking quickstart

This guide will help you get started with the line tracking algorithm on the Pixy2.

Running line tracking through PixyMon

PixyMon will display what Pixy2 detects graphically and is a good way to familiarize yourself with what the line tracking algorithm is capable of, and it's a good way to make adjustments. Start by selecting the line tracking algorithm in the Program menu.

* pic Draw a line on a piece of paper and put it in front of Pixy2. Pencil will work, but black marker is usually better. You should see something like this: * pic

What Pixy2 has done is found the best line candidate to track and has assigned it to the Vector. The Vector is the line that Pixy2 (or your robot) is currently tracking/following. You can move the paper and see that Pixy2 can track the line fairly quickly. PixyMon slows down the tracking algorithm typically to 20-30 frames-per-second because it takes some time to send the raw frame data across USB, but if you change the view to “no background”, you can get a feel for what the tracking algorithm looks like at the native 60 frames-per-second. This is framerate your robot will see.
* pic Go ahead and change back to the “All features” view if you switched views. Make a 4-way intersection by drawing another line through the original line and place it in front of Pixy2. Pixy2 will identify the intersection and quickly choose the default branch of the intersection, which is the “straightest” branch of the intersection.
You can change the “default turn angle” in the Expert configure tab. You'll see that the default turn angle is 0 (by default), which is straight. The angle is based on a straight-referenced angle coordinate scheme.
* angle pic

wiki/v2/line_quickstart.1530636427.txt.gz · Last modified: 2018/07/03 16:47 by pixycam