Good morning! (At least where I am currently)
So I have been reading through the forums and previous versions of the CMUCams but maybe I am not sure where to start with the Pixy for lane following.
One of my professors asked that I do a lane following robot for our final project which is due in 2 weeks (I promise I haven’t procrastinated, I received the task description last week and the Pixy on Friday) and suggested I look into the Pixy which looks really good and promising so I picked one up. But it doesn’t look like there are many examples on how to use the camera and do even simple line following like there are for previous versions.
Has anyone tackled line or lane following with the Pixy and may have some suggestions on where to start? From the examples I understand how to obtain the pixels but how do I specify which signature/color I am looking for and how do I restrict the window I am processing so the robot sees only a few inches to maybe a foot in front of it to assist it with navigating the curves?
I am assuming, please please correct me if this is the wrong way to think about it, that from getting the centroid of the detected right lane line and the centroid of the left lane line I can then calculate whether I am roughly equal distance and then just turn my wheels as needed to move myself back to the middle of the lane. Even if this assumption is correct, I still don’t understand how to specify the green I am looking for, look for 2 lines, and restrict the viewing window.
I am using an Arduino Mega and have played a bit with PixyMon (I like the purple triceratops icon, makes for a fun explanation when people ask what it is).
I would greatly appreciate any hints, tips, tricks, examples, links, anything you can give me to help me get on the right track to complete this project.
Thank you!
Kelly