Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Robotics and Computer Vision

Couple of friends and i will be building simple robot to track a white line on a black surface, we have never done this sort of thing before and i have very high level plan of attack,

Get a mini atx board for all computing needs, a web cam to track the road and 2 electric motors one for propulsion one for direction.

My main concern is, is there a better way to track the road? or does a webcam work for the job?

EDIT:

Follow up on the answers using Photoresistor seems to be the way to go, bu i have one more question there will be signals, to the right of the track telling the robot which way to turn. again white on black. such as i have to make a left on a t-junction. is there a way to handle this without a camera?

like image 348
Hamza Yerlikaya Avatar asked Oct 07 '09 16:10

Hamza Yerlikaya


4 Answers

It's best to bypass elaborate vision software altogether and use simple electronics. There are devices called phototransistors which are sensitive to light. Point two downwards at each side of the robot, shadowed from light from above. If the bot starts to go right instead of following the line, the left sensor will be activated. If it goes left, the right one will be activated. Use the feedback of these signals to guide the robot (you could possibly apply them almost directly to the motors if you have two motors).

like image 162
Emilio M Bumachar Avatar answered Oct 13 '22 00:10

Emilio M Bumachar


A web cam will have no trouble tracking a white line on a black background, and if you do find you have sensitivity issues, it's an easily upgradable piece of the system. (you'd only need to plug in a more expensive cam)

It might interest you to have a look at OpenCV,

(Open Source Computer Vision) is a library of programming functions for real time computer vision.

It may give you some ideas for you implementation, or even be of use to you if you end up using C++

edit: although using LDRs like Andrew M suggested may be a simpler solution :)

like image 44
RYFN Avatar answered Oct 13 '22 01:10

RYFN


I made a similar robot in school, and made two little sensors, basically just LDR's in a light-proof tube with a circuit to control the threshold of light that made the flip from on to off. It made the logic very simple - is there a black line under this sensor? Yes|No.

Using a web cam might involve quite a lot of visual processing.

In the meantime though, you can work on your other subsystems, ie controlling the motors from the computer, and building the thing itself and figuring out how to power it all.

like image 41
Andrew M Avatar answered Oct 13 '22 00:10

Andrew M


Previous comments about using a photo sensor are good suggestions, although they might be harder to find/make something that will plug into a USB port.

If you do go the camera route, I'd suggest you emulate a simple sensor; perhaps take an average of the left and right halves of the input as an indication to drive straight/left/right.

But, if you want to spend less time building the custom pieces, you might check out the LEGO NXT kit. They come with an optical sensor and a graphical programming environment. Even if you don't buy one, you might learn from the community discussions surrounding it.

  • http://mindstorms.lego.com/nxtlog/projectlist.aspx?SearchText=castor
  • http://www.nxtprograms.com/NXT2/castor_bot/steps.html
like image 39
NVRAM Avatar answered Oct 13 '22 01:10

NVRAM