go_away

Author Topic: road sensing robot  (Read 2090 times)

0 Members and 1 Guest are viewing this topic.

Offline jonny_u2005Topic starter

  • Jr. Member
  • **
  • Posts: 10
  • Helpful? 0
road sensing robot
« on: January 04, 2010, 03:48:06 PM »
hi guys!
    I'm a student in robotics and have recently joined a competition in which I must build a road sensing robot.The road will consist from two white stripes, 2 inches wide drawn onto a blue carpet.The distance between them is 20 inches.My robot must stay "on the road", between the two stripes.The robot has to cost under 150$ and move as fast as possible.Initially, I thought using two simple IR sensors and sense the lines as the robot crosses them and compute the necessary adjustments so that my thingy stays on the road.The trajectory of the robot would be much like a zig-zag.I don't really like that.The idea is that I want my robot to sense the lines from some distance (5 to 15 inches).Could I make a sensor that would behave as an obscure chamber with a phototransistor at the bottom ? I would mount a flashlight on my robot and aim it to the road.When the tube is aligned with the white stripe,that stripe will reflect more light to my sensor.The small hole will control the "width" of the image - how wide is the portion of the road I can scan. I forgot...I'm a beginner :).What do you think? Could it be done? Any ideas? Thanks!

Offline z.s.tar.gz

  • Supreme Robot
  • *****
  • Posts: 540
  • Helpful? 5
  • Linux Guru
Re: road sensing robot
« Reply #1 on: January 04, 2010, 04:12:15 PM »
This is the perfect situation for a camera, with the simple patterns and high contrast.
Exactly how to do that, I have no idea. But that's what I'd look into.
Save yourself the typing. Just call me Zach.

Offline little-c

  • Robot Overlord
  • ****
  • Posts: 186
  • Helpful? 1
Re: road sensing robot
« Reply #2 on: January 04, 2010, 04:44:32 PM »
line follow to one side of the road? ie set robot off at speed, once it senses the line, it follows the line, whilst been offset from the line? (ie the sensor is mounted so the robot is inside the road whilst the sensor is reading the line)

neat trick would be to take the shortest side of the road to follow. ie make an algorithim to cut corners?

requires memory and some form of dead reconing, and could be a desaster. but if you got it working, it would be brilliant.

ie if you have
    __
   / _
_/ /
 _/

it would cut from the outside of a corner, to the inside of the corner. instead of following the outside of the corner.

requires a relativly high memory, 4-8kbytes? but little else in the way of complex stuff, a pair of H bridges to run two motors, wheels, a castor of sorts, pair of IR sensors(or four might make it easier?), some chassis of a sort. could almost dumpster dive for everything bar the MCU. then buy a realy good mcu if you can keep it(hey the budget is there, spend it on good reusable componants for something else latter on ;) )

tracker ball from an old mouse and pair of lids from a jar, bit of sand paper for traction, some old coat hangers. even paper machy(paper, glue and a little water) and cardboard chassis. cheep as dirt. or a bottle of pva glue! (serroiusly, that was just an idea I made up in about 5 seconds. its not tried or even remotely attempted yet. it will be, but latter on in the week! use at own risk.)


this is me coming up with ideas of the top of my head. helps that I am mental. anyway. you don't have to build the robot from a dumpster, or blue peter style, but I wouldn't spend much on chassies or wheels. get two same sized wheels. and a fairly rigid chassis.

Offline rgcustodio

  • Robot Overlord
  • ****
  • Posts: 217
  • Helpful? 0
  • Use "Search" and ye might find answers!
Re: road sensing robot
« Reply #3 on: January 04, 2010, 05:19:26 PM »
Your idea might work. How will your idea handle turns, though? Don't worry other systems would also have some problems with this.

As mentioned by z.s.tar.gz a camera will be a very good option but you got to have the resources (processing power and some extra memory) for that option to properly work.


Check out some of the videos in the forum, I think there's one video of a robot with a "scanning line head" (of course that's a made up term). Simply put, it has a photoresistor that is mounted on a servo in front of the robot. The servo swings back and forth trying to detect the line. This was used on a line following demo but might also work for your application.
The best thing one can do when it's raining is to let it rain. - H. W. Longfellow

understanding is the path to enlightenment

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: road sensing robot
« Reply #4 on: January 04, 2010, 06:19:52 PM »
i think a wall following algorithm would work well for this, have a sensor offset from the robot and it stays above the while line at all times...
Howdy

Offline jonny_u2005Topic starter

  • Jr. Member
  • **
  • Posts: 10
  • Helpful? 0
Re: road sensing robot
« Reply #5 on: January 05, 2010, 06:58:24 AM »
thanks for the ideas.I decided that I will use a cheap chassis from a toy car,instead of building a differential one.My concern is the turning radius in corners. I will try modifying the steering mechanism ie use a servo to turn.I think this would give me a bigger turn angle for the front wheels.The signal for the servo will be generated by the microcontroller - PWM. The microcontroller will be a AVR ATMEGA .I think  i'll use two simple IR sensors and write an algorithm that tracks the line although I don't like this idea too much.Could it be possible to use IR sharpfinder mounted at angle, downwards, to output something like 213 321 235 223 0 0 234 212 233 , the zeros indicating the line?

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: road sensing robot
« Reply #6 on: January 05, 2010, 07:02:38 AM »
well, a sharp ir could work like that, are you allowed to travel on top of the line?
Howdy

Offline jonny_u2005Topic starter

  • Jr. Member
  • **
  • Posts: 10
  • Helpful? 0
Re: road sensing robot
« Reply #7 on: January 05, 2010, 07:05:58 AM »
about the IR sharp: wanna hack it so that it detects color.I need it's range and I only need for it to sense the difference between white and blue.The camera idea was considered but I need processing power...thought using a cell phone that has J2ME and a camera,write an application that does basic image processing - edge detection.This solution would complicate my project and getting a high performace phone would blow my budget.

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: road sensing robot
« Reply #8 on: January 05, 2010, 07:07:14 AM »
Did you look at the color sensing tutorial on the main site?
Howdy

Offline jonny_u2005Topic starter

  • Jr. Member
  • **
  • Posts: 10
  • Helpful? 0
Re: road sensing robot
« Reply #9 on: January 05, 2010, 07:13:32 AM »
here are the contest rules....http://www.conti-online.com/generator/www/com/en/continental/hr/themes/countries/romania/hidden/quality_management_course/Rules%20and%20regulations.pdf

Yup, I've read the color sensing tutorial.I've never used color sensors before.Would a simple color sensor give me some range in order to detect the a line that's 5 inches away?

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: road sensing robot
« Reply #10 on: January 05, 2010, 07:23:04 AM »
ohh, 5 inches might be pushing it :-\ Where did you get 5 inches from?
Actually, sharp ir sensors might return different values from blue and white so it might be possible...
Howdy

Offline jonny_u2005Topic starter

  • Jr. Member
  • **
  • Posts: 10
  • Helpful? 0
Re: road sensing robot
« Reply #11 on: January 05, 2010, 07:31:31 AM »
ohh, 5 inches might be pushing it :-\ Where did you get 5 inches from?
Actually, sharp ir sensors might return different values from blue and white so it might be possible...


well, let's say I mount the sensors on a wide bumper,30cm long.Having the robot in the middle of the road, i got 10 cm from the line on each side.I don't want my robot to navigate close to the line and a 50 cm wide bumper is ludacris.

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: road sensing robot
« Reply #12 on: January 05, 2010, 07:37:43 AM »
well, i take it your robot isn't going to be 5" from the ground? A color sensor would work in this case.
Your bumper idea is great, just have the code:
Quote
IF left sensor sees line
( drive right)
Else if right sensor sees line
(drive left)
Else
(drive straight)
Also, you could try angling the sensors outward to stay further away from the line although it may affect sensor readings.
Howdy

Offline jonny_u2005Topic starter

  • Jr. Member
  • **
  • Posts: 10
  • Helpful? 0
Re: road sensing robot
« Reply #13 on: January 05, 2010, 07:47:41 AM »
well, i take it your robot isn't going to be 5" from the ground?

No, my robot will be quite close to the ground.I want my color sensor to be mounted on the top of the bumper, at an angle,looking downward and,as you said, slightly outward so that it can detect the line from some distance.

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: road sensing robot
« Reply #14 on: January 05, 2010, 07:51:22 AM »
Ahh, well then that's an easy setup!
A few led's and photoresistors and your in business.
The code will do most of the work for the sensitivity and all...
Howdy

Offline jonny_u2005Topic starter

  • Jr. Member
  • **
  • Posts: 10
  • Helpful? 0
Re: road sensing robot
« Reply #15 on: January 05, 2010, 08:06:40 AM »
cool.I'll soon buy the parts and start constructing my thingy.Pictures will be posted as I go through the build.Thanks!

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: road sensing robot
« Reply #16 on: January 06, 2010, 11:41:45 AM »
Hi,

I decided that I will use a cheap chassis from a toy car,instead of building a differential one.My concern is the turning radius in corners. I will try modifying the steering mechanism ie use a servo to turn.I think this would give me a bigger turn angle for the front wheels.
You cannot get a much less turn radius from a toy car chassis without completely rebuilding it (and steering on all 4 wheels).
Depending on the radii of the turns, you will be much better off with differential steering. You'd have to go back and forth a couple of times in 90° turns with a toy car and that would seriously impact the track time.


As to the sensors. Do you have access to a sample of the carpet for testing?
There are several ways to sense the lines. The easiest will be to "hug" one of the lines at a distance, either by say 8 opto-receivers and some LEDs (Orange might be beneficial, as it's the complementary color to blue - needs testing though) to light it up, or by a LASER pointer and a simple beam splitter or a moving beam.

The rules doesn't say anything about track length?
How fast do you reckon you have to go to win?

150€ should go a long way, as long as you forget ideas about cameras and other fancy equipment (which will slow down development as well as track speed.

Go for the simplest solutions that will get you down the track in a stable manner.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline jonny_u2005Topic starter

  • Jr. Member
  • **
  • Posts: 10
  • Helpful? 0
Re: road sensing robot
« Reply #17 on: January 06, 2010, 01:00:25 PM »
Soreen, I don't have access to a blue carpet like the one used in contest.However,I'll try to tweek my robot at school.They might have something similar.As for "line hug",what did you meant?
The lenght of the track is 10 meters.
How fast should I go? Dunno..I think something like 50cm/s would be great.
As for the car, I might drive it backwards.This should provide a better turn radius.Mount the sensors in the back and drive in reverse  :D
Great idea with the orange LED's, I will try that. Instead of photoresistors, I read that they are quite slow to respond, phototransistors are much better.What do you think?

Offline z.s.tar.gz

  • Supreme Robot
  • *****
  • Posts: 540
  • Helpful? 5
  • Linux Guru
Re: road sensing robot
« Reply #18 on: January 06, 2010, 03:24:39 PM »
I've never heard anything about photoresistors being slow personally, but why don't you go with a 3 wheeled vehicle?

It acts like the third example from wikipedia in that the back wheel turns. This gives you great turn radius and wouldn't be too hard to rig up on a toy car (although it'll be far less professional looking, but who cares about that if it works great?)

Save yourself the typing. Just call me Zach.

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: road sensing robot
« Reply #19 on: January 06, 2010, 04:53:46 PM »
Hi,

As for "line hug",what did you meant?
You detect one of the lines and follow that, just a distance from it.


The Length of the track is 10 meters.
How fast should I go? Dunno..I think something like 50cm/s would be great.
That shouldn't be too hard, depending on how many turns there is, as long as you stay away from servos for locomotion.


As for the car, I might drive it backwards.This should provide a better turn radius.
How do you figure that?
If the front wheels turn a certain amount, it will have a certain turn radius, no matter which way it goes.


[...] photoresistors, I read that they are quite slow to respond, phototransistors are much better.What do you think?
Yes, photo resistors are extremely slow, photo transistors are much faster and photo diodes are even faster.
Photo transistors will be fine in your case.
You need to mount it as high as possible, to be able to see the line out to one side. Lenses and/or tubes will help steer the light.

You should opt for the "outer" half of your sensors reading white and the rest reading the blue carpet inside the line.
If you sense the right line and use 8 sensors and it reads (blue and white):
bwwwwwww, you should turn hard left
bbwwwwww, you should turn left
bbbwwwww, you should turn slightly left
bbbbwwww, you just go straight
bbbbbwww, you steer slightly to the right
bbbbbbww, more to the right
bbbbbbbw, still more to the right
bbbbbbbb, hard right
wbbbbbbb, left line reached, go right
wwbbbbbb  --
wwwbbbbb  --
wwwwbbb etc. means you've reached the left line and have to go very much right

Whether the first couple of instances will be blue at the rightmost sensors depends on the line width and the spread of your sensors.
IR has got the best range, but for setup, it will be easier to use red LEDs for visible reassurance.
Modulating the LEDs will make it much easier to tell the difference between the detectors light and ambient light.

Do you have access to small lenses (acrylic is fine) to focus light?
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline z.s.tar.gz

  • Supreme Robot
  • *****
  • Posts: 540
  • Helpful? 5
  • Linux Guru
Re: road sensing robot
« Reply #20 on: January 06, 2010, 05:23:28 PM »
Hmm, I guess you learn something new every day.
Save yourself the typing. Just call me Zach.

Offline jonny_u2005Topic starter

  • Jr. Member
  • **
  • Posts: 10
  • Helpful? 0
Re: road sensing robot
« Reply #21 on: January 07, 2010, 11:01:27 AM »
Do you have access to small lenses (acrylic is fine) to focus light?
Nope,I'll use some tubes to focus light.
Quote
How do you figure that?
If the front wheels turn a certain amount, it will have a certain turn radius, no matter which way it goes.
Well,consider the situation of parking.It's easier to park going backwards because you can point the back of the car more precise.I admit that the steering radius is about the same, it's about orienting the car.

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: road sensing robot
« Reply #22 on: January 08, 2010, 10:10:56 PM »
Hi,

Well,consider the situation of parking.It's easier to park going backwards because you can point the back of the car more precise.I admit that the steering radius is about the same, it's about orienting the car.
You park backwards to be able to park in less space, if you have an entire empty road, it's far easier to park going forward, but given only slightly more space than the cars length, you need to go backwards since it's the front wheels that turn and you need to bring the car parallel to the curb, so the wheels that is used for steering the car has to go in last.

The steering radius is not "about the same", it IS the same.
The center of a turn is in a straight line from the rear axle and the front wheels are each turned to be at right angles (neglecting the effects of camber, caster and toe) to lines that are radiii of the 2 coaxial circles that the wheels travels. It's like with with a drawing compass, no matter which way you go round, the circle remains the same size.

With differential steering on a setup with two wheels plus a castered support wheel/ball, you would be able to keep the same distance from the white line, but that's impossible with a front wheel steered four wheel rig (whether going forward or backwards).
Further, you cannot get much smaller angles out of the average car, as the wheel hubs are stopped by their support at a relatively wide turns radius.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline jonny_u2005Topic starter

  • Jr. Member
  • **
  • Posts: 10
  • Helpful? 0
Re: road sensing robot
« Reply #23 on: January 09, 2010, 01:06:23 AM »
Hate to admit, you're right.

 


Get Your Ad Here