Friday, February 16, 2007

Autonomous RC Car with Laser Based Obstacle Detector

Autonomous RC car with laser based obstacle detector on Vimeo

Hello Readers!

This is my first project with the computer controlled RC car, I made. Instead of purchasing ultrasonic obstacle detectors, I used my laser based obstacle detector with the RC car to turn it into an autonomous vehicle. The computer determines the position of the laser dot in the webcam's field of view. Based on its position on the y-axis, it determines how close the obstacle is, in front of the car. When an obstacle gets really close, the computer stops the car and turns it until it finds a place with no obstacles in close range. Check out the video above to see it in action! I apologize for the camera shakes in the video. I was finding it really difficult to do several things at the same time. Anyway, I admit that it would be much more fun and exciting if I had a wireless webcam. I can't stop thinking of the possibilities!


Chris said...

Maybe you could work something out with mirrors so it can detect obstacles not only in front of it, but to the left, right, and back of it.

Also, you could position the webcam to give a birds-eye view of an area filled with obstacles and make a pathfinding program or something. The fact that the car is red makes it easily detectable to the camera.

Just some ideas.
Good job!

Anonymous said...

Hi Ashish - Looks very cool!

I would love to see your code for the laser detection algorithm. I got something working but doesn't work too good unless the room is fairly dark. Check out my robot at Nivek I. I found this fairly cheap wireless web cam at: amazon.

Nice job!


rodbotic said...


use a line laser or shine that pen laser through a glass rod to make one.

I developed a 3d scanner for a company using logitech webcams and some line lasers.

but you could use it to detect a plain in front of the car then develop a pseudo map of the room.
or use it to follow a wall.

Ashish Derhgawen said...

Nice idea...

machine said...

really iam so happy 2 find what i was looking for .i creat the same project but with a home made robot and i use the mobile cam as a webcam and i control the robot by using wireless circit and blue tooth in mobile .but i need a help 2 make my robot Obstacle detector using webcam as your car so plz could u send 2 me the source code or a motion detection source code

Unknown said...

Hello....i am sreejith....i am a final year engineering student....can you please send me your code to it will be very useful for our projects...

Eric said...

Can you please share your project source code with me. My email is

Nice Stuff!

Anonymous said...

hey...i m also doing this project..Computer controlled car..I have used MATALB GUI botton as Push botton for the movement....I m stuck with the transmitter connection to parallel port..So ..plz..send me anything related to connecting n identifying...the pins for transmitter of the toy car..

Anonymous said...

Thanks for your nice post!

Anonymous said...

brilliant...i wanna build it...need your help & i have emailed you.....plzzzzz help

Anonymous said...

Good job mate!!nice efforts.
Keep it going!!

Nirav Vasa said...

Hey, I would really want to see your algorithm for laser detection. I tried to develop one, but it does not seem to work as expected.

U can reach me at sendtonirav@gmailcom

Thank you

Anonymous said...

absolutely gr8 luv ur idea i wish i could do tht stuff i got a viper 4 xmas and am stuck on building the bump sensors at the front!!! I just can see how a bit of blue plastic and a C shaped circuit boad has anything to do with it

Im gunna try and program it 2 morrow. I wonder how i find it

Unknown said...

great job done
please send the material of how to build this robot
also send the code for this
my id is

Unknown said...

Hi,mind sending me the code >>

Anonymous said...

Good Job! :)

Anonymous said...

Hey Ashish,
I Like Your Projects...

I want to make a project for my last year of IT.

So Plz Send Me More Details Of RC Cars You Have Made...On My Id

RIGHT's ANGLE said...

nice work mahn..
even iam also doin a similar project but stuck in the middle of it.
can u send me ur source code so that i will get to know where iam lagging
send it to

Anonymous said...

Hello Ashish u have fabuolous projects. i liked it all
Will u plz send me the codes on

Anonymous said...

Aston Villa rode their luck at Hull City where an 88-minute own goal from Kamil Zayatte saw them leapfrog three points clear of Arsenal and into fourth place in the Premier League wow gold with a 1-0 win.

Villa had to survive Hull penalty appeals for a handball against Ashley Young in time added on, television replays showing that referee Steve Bennett wow gold correctly rejected the claims after consulting a linesman.

Bennett had been involved in controversy after just five minutes when American goalkeeper Brad Friedel looked to have handed Hull the initiative and threaten Villa's return to the Champions League qualifying wow gold zone.

Friedel spilled wow gold the ball under pressure from Nick Barmby and stand-in right-back Nigel Reo-Coker turned it into his own net as he attempted to wow gold clear.

But Bennett cut short wow gold celebrations at the KC Stadium -- and let Friedel off the hook -- when he ruled out the score for an apparent infringement by Barmby.

Zayatte's intervention from a Young cross bound for wow gold Gabriel Agbonlahor then saw Villa leapfrog Arsenal and draw level with Manchester United on 38 points -- seven adrift of leaders Liverpool and four wow gold behind Chelsea.

Stung by an on-pitch dressing down wow gold by manager Phil Brown at Manchester City last week, Hull showed five changes and a vastly improved performance.

Promoted Hull were looking for only their second win in 11 games while wow gold Villa arrived unbeaten in seven and it looked to be heading for a goalless draw when the home side suffered a cruel late blow.

Anonymous said...

hi there its nice work
could u send me a code of it

Anonymous said...

hi,i hv to say,really impress with your work..and i think i want to build it too..can u help me by sending the code and enything that can help me to build the robot?
thanks in advance..=)
owh,can u explain how the laser and webcam work to detect range??

Anonymous said...

Hey Ashish! What program do you use to run the code? Also could you send me the code that you used. I'm trying to make a laser range finder webcam too, but am having trouble writing up the code because i'm not good at programming.

Unknown said...

A+ good job ... i want to build this project

could you please help me..

yuki said...

greetings! sorry to ask you abruptly..but can i ask for the code you used regarding your project "autonomous rc car with laser based obstacle detector? hoping for your kind consideration. thank you so much. it would be a great help.... you can email meat

Riaan Deyzel said...

Good day
Cool project, can i please get the source code for this project, its awesome.

Riaan Deyzel

Riaan Deyzel said...

Please see above message of mine
My e-mail is

anandhi said...

interesting blog. It would be great if you can provide more details about it. Thanks you.

Line Lasers

JKelley said...

Really cool! Can you send me your code for it? Thanks.

Anonymous said...

Good day

Please send me the source code for this "Autonomous RC Car with Laser Based Obstacle Detector".

Thank you so much.
Keep up the googd work, your projects are awesome.

Have you tried to pan & tilt servos connected to your Arduino yet, with C# code running on a PC?