Shop OBEX P1 Docs P2 Docs Learn Events
Robot to determine location — Parallax Forums

Robot to determine location

Spiral_72Spiral_72 Posts: 791
edited 2011-03-29 14:30 in Robotics
How about a little brainstorming? Just to warn you, I figure this is a very deep subject.

How does a robot know where it's at indoors? X & Y coordinates would work I think, maybe a Z (Height) axis, but I'll disregard the Z for now. Say this is a walking robot, or a rolling one without encoders. Aren't encoders pretty useless on carpet anyways?

For the average house, maybe 1200-2000sf with the furniture and other objects pretty much stay a known place ,excluding my shoes which somehow are never in their proper place. I suppose a map could be made of the house and stored in memory. Games do this, Wolfenstein all the way to whatever the current games are. Unfortunately, the robot doesn't have the luxury of being software generated.

My reading and thoughts have led me to the following:

GPS:
Doesn't work well indoors and even if it did, coordinates are only accurate to a published 5m (16ft)

IR beacons throughout the house emitting a location ID:
Only line of sight, and interpolating between several beacons probably won't be very accurate especially since the distance to each beacon is unknown..... although it may be possible to determine distance from light intensity.

RFID tags throughout the house with a location ID:
This MAY work, but to my knowledge RFID has a very limited range. This could work to my favor though because at least location could be known because of close proximity.

Ultrasonic beacons throughout the house with a location ID:
This would actually work well I think if sound didn't bounce off every object in the room.

Vision and object identification:
Wow

Maybe a combination of RFID and feelers?
With a compass and a map in memory, this might work.


Would anyone care to argue or pose any new ideas? I've read about lots of ideas and watched robots with vision that worked in a limited space, wheel encoders never seem to be that fantastic by themselves.
«1

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2011-02-11 11:47
    I think the heart of any such scheme is the internal map and some kind of estimate of the current location based on the robot's own movement. Whether it's a wheeled robot with wheel encoders or a walking robot with estimates of movement from the walking algorithm, the robot "knows" where it's supposed to be based on past experience. These estimates need to be recalibrated and the position re-estimated based on environmental feedback. Ideally, vision feedback and object identification can be used. With a fair estimate of the robot's position, the object identification can be driven from a stored set of abstract images based on major edges in the environment like doorframes or ceiling/wall boundaries. Ultrasonic or IR beacons could be used to identify the room or the portion of the room to help disambiguate similar rooms.
  • Spiral_72Spiral_72 Posts: 791
    edited 2011-02-11 13:11
    Thank you Mike at least you agree with the map. I'm a little discouraged by the vision aspect though!

    I'm also wondering how a Bot could use a laser distance sensor on a 360 degree turret. It would basically be sonar. I can't imagine the algorithm to "Fit" the acquired data to a known map though. I bet this brute force method would be very accurate...... and slow :) 360 distance measurements fit to a map with an unknown position or heading.... Wow!



    edit: On second thought.... Unknown heading isn't exactly true. With a compass, the approximate heading can be known, which would make things a LOT easier. You would need to ignore smaller details though, like chair legs, etc. depending on the height of the measurement obviously.
  • Spiral_72Spiral_72 Posts: 791
    edited 2011-02-11 13:30
    Gee sir. Those are really expensive. Man, I could have sworn Harbor Freight and Sears sold them for like $20. I guess I was thinking of ultrasonic or something.



    and I'm not the first person to think of this unfortunately.
  • Mike GreenMike Green Posts: 23,101
    edited 2011-02-11 13:57
    What you want to do with the vision stuff is to make abstractions early on. I've seen some YouTube videos and mentions in the technical web about edge identification algorithms described in various university theses. That's the sort of thing you want. If you can get a couple of overwhelmingly linear features out of your video, you can "easily" match them in 3-space against wall/ceiling edges and doorframes,
  • Duane DegnDuane Degn Posts: 10,588
    edited 2011-02-11 17:04
    I think (and hope) the little camera in a Wii Mote could be useful for this kind of application.

    Your IR beacons could consist of two IR LEDs. Distance could be determined by how far apart the appear on the camera.

    The Wii camera can also "see" laser spots (It seems to see a red laser best according to my tests (no filter on camera)). A combination of one of these cameras and a laser could be used as a range finder to correct encoder errors.

    I've been anxious to try some of these Wii camera ideas out but I have too many "day job" projects. Fortunately my "day job" projects are also fun (Prop powered data logging).

    Duane
  • kelvin jameskelvin james Posts: 531
    edited 2011-02-11 17:16
    I would think by far, that the Neato robot vaccum is the place to look for indoor navigation. It has a 360 degree laser scanner that can map an area into memory, and has around a 17 foot range. If you look around, there is some info regarding hacking into the Neato scanner. It does cost around 400 bucks, but if you look at the cost of commercial laser scanners, this is nothing. It would be cool to have a psuedo sat sysytem for indoor gps, but i don't think that will happen soon.
  • Spiral_72Spiral_72 Posts: 791
    edited 2011-02-11 18:57
    The most versatile, difficult and processor intensive of the comments so far is imaging (Mike). I can't even begin to comprehend this method. That doesn't mean it's not possible.
    Mike: I saw a youtube video several months ago made by a fella' that put vision on his Bot. His algorithm actually highlighted features on the video in real time. The Bot would travel to waypoints he commanded. I wish I could find it again. It's some pretty heavy stuff.

    The laser distance seems the most hobby-friendly, the most feasible. I did find the Neato vacuum. From my reading, they were going to release the sensor for sale <$100, but I cannot find any source or any indication of anyone actually buying one. Maybe they had a problem with it? i Did find an article explaining it's function though. Hacking the vacuum is one possibility. I also found the Bosch DLR130K for $91 on Amazon. I don't know yet if anyone has hacked it, but surely it's possible.
    http://www.neatorobotics.com/


    Duane: "The Wii camera can also "see" laser spots (It seems to see a red laser best according to my tests (no filter on camera)). A combination of one of these cameras and a laser could be used as a range finder to correct encoder errors."
    I'm not sure what this means??? Would this use trig? or?

    I wish I could find <1ft capable GPS. The best I have come up with was multiple GPS units spaced some distance apart and interpolate the results. Supposedly there are two bands on the GPS. The one consumers use it guaranteed 5m resulotion, but the other??? Military? I dunno. I can't find a receiver that uses the second band/protocol/whatever.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2011-02-11 20:31
    I'm not sure what this means??? Would this use trig? or?

    There are several possible ways to use a laser and camera. And yes, they all (at least all I can think of) require trig.

    One approach would be to have the camera and laser pointed parallel to each other. The position of the dot the camera sees will change depending on how far away the target is.

    There are other ways that could increase accuracy by being able to point the camera and or laser to keep the laser dot within the camera's field of view. If the angles could be precisely known the distance calculation would be more precise. I think if the mounting distance between laser and camera could be increased, distance could be measured with greater precision than having the laser and camera mounted close together. (It's easier to triangulate a distance with a wider base on the triangle.)

    [Side Note]
    When the Allied Forces wanted to bomb German dams during WWII, they needed a very precise altimeter. Air pressure altimeters weren't accurate enough. (According to the movie I watched.)

    They mounted a search light on the font and rear of the bomber. The search lights were angle such that at the desired altitude the two spots of light met. By watching the spots of light on the water surface they knew if they were too high or too low.
    [\Side Note]
    Instead of using two spot lights, we can use one (a laser) and by measuring the angle required to center the laser spot in the camera's view we can compute the distance to the laser spot.

    One doesn't have to center the laser spot in the camera's field of view because the angle the camera is off center can be computed based on the distance the spot is from the view's center. (Using the x,y values provide by the camera.)(And trig.)

    I've got to do this. The Wii camera and laser are calling to me. I can't resist much longer.
  • Spiral_72Spiral_72 Posts: 791
    edited 2011-02-12 13:41
    This might help you out:
    http://sites.google.com/site/todddanko/home/webcam_laser_ranger

    I'm sure there are a lot more.
  • Spiral_72Spiral_72 Posts: 791
    edited 2011-02-15 11:27
    Mike:

    Best Buy has webcams for $8 apiece. I don't remember the brand, but it's supposed to be 2Mp.... I'm planning to get three of them tonight after work. Two for stereo / depth perception, and one to blow up :)
    Machine vision seems like an awefull big undertaking though.
  • Adam WieslerAdam Wiesler Posts: 81
    edited 2011-02-15 21:39
    Hopefully this hasn't been mentioned (I'm on my phones small screen and didn't read the entire thing), what what I think night work best here is the microsoft Kinect. I don't have one yet, but the things people have done are cool. They have full 3d mapping throught use of infrared camera and projectors making dots in a certain sequence, and then it can output all of that data through a single usb cable to a PC. I hope to do something like this this summer when I have more time.
  • AJ-9000AJ-9000 Posts: 52
    edited 2011-02-16 06:01
    kiva robots uses diferent barcodes on the floor, wheel encoders and gyros to determine there location, here's a thread on them;
    http://forums.parallax.com/showthread.php?122666-Robots-Are-more-better-in-this-case-I-think-so.
    What if you used diferent RFID tags under the carpet instead.
  • Spiral_72Spiral_72 Posts: 791
    edited 2011-02-16 09:31
    Adam: Oh yea, I'd really like to play with the Kinect, a buddy has one, but I don't think he'll let me take it apart :) I've heard of some of the things people have done with this "Uncrackable" system.

    AJ-9000: I'll check out the link. I have an RFID system in my shopping cart now trying to decide. Under the carpet is probably a better idea than on the wall like I was considering. I'm not sure, with RFID it's more like knowing what town of the state you are in rather than actually know WHERE you are..... but I think it would work very well with some sort of optical-like system whether is laser / ultrasonic or camera.

    I purchased a 2048 pixel line scan sensor off Ebay for $6 + $6 shipping. I got VERY lucky if it works. The cheapest sensor I've seen so far with more than about 500 pixels is well over $100. The Parallax unit is $50 and only 128 pixel.... good for line following, but I don't think much more than that..... That's what it's intended for actually.
    http://cgi.ebay.com/Fairchild-CAM1500R-Industrial-Line-Scan-Camer-/270703900730?pt=Vintage_Electronics_R2&hash=item3f0735b83a
  • Beau SchwabeBeau Schwabe Posts: 6,566
    edited 2011-02-16 10:02
    For visual detection you can apply the Parallax effect. Here is an article I put together a couple of years ago explaining the concept...

    http://forums.parallax.com/showthread.php?118023-An-example-of-the-Parallax-effect...&highlight=Parallax+effect+schwabe
  • Duane DegnDuane Degn Posts: 10,588
    edited 2011-02-16 10:23
    The Wii Mote camera is 128 x 96. But by taking into account the brightness of surounding pixels, Graham Stabler's object calculates the brightest blobs' position with a resolution of 1024 x 768. I haven't tested how accurate this is. It seems to me this would be a relatively easy way to make a laser range finder.

    Spiral_72, The link you gave is a good starting point. One problem is the trade off between the precision of the distance information is based on how far apart the laser and camara are. The father away they are the better the distance resolution. But when the laser and camera are far apart object that are close are no long in the field of view. I'm hoping to be able to pivot either the laser of the camera so I can see close objects as well as more distant objects. I think such a system is within the abilities of a Propeller chip.

    I recently ordered some generic Wii Motes and Nunchucks. I'm very interested to see if the cameras on the generic use the same communication protocol.

    I don't think I mentioned, the Wii camera needs to be removed from the Wii Mote before using it with the Prop.

    Duane
  • Duane DegnDuane Degn Posts: 10,588
    edited 2011-02-16 10:43
    I hadn't seen Beau's post when I entered my last post.

    It looks like the "Parallax Effect" uses a computer for image processing. I'm hoping to keep my system on a Prop. I think a laser and Wii camera would be an easier method for the Prop to handle. Of course I have the problem of laser light. I'll need to keep the robot under supervision.
  • PliersPliers Posts: 280
    edited 2011-02-16 11:52
    The simplest would be an infra-red encode ceiling.
    The ceiling is marked with a highly infra-red reflective paint. The markings could be coded in a number of ways. A bar code comes to mind.
    Anyhow, I'm thinking that it could be like the encoders on wheels. As the robot moves, it would see the blinking infra-red signals.
    I love this idea. Why not infra-red mark the walls to. Not the floors because the paint would fade quickly.
    Patent pending soon.
  • Beau SchwabeBeau Schwabe Posts: 6,566
    edited 2011-02-16 12:16
    Duane Degn,

    "...I hadn't seen Beau's post when I entered my last post....It looks like the "Parallax Effect" uses a computer for image processing. I'm hoping to keep my system on a Prop...." - What I was showing was just a possible method. No PC required other than to program :-)

    Along similar lines, if you took two of the Wii cameras as your binocular vision, and simply looked for the convergence you would directly be able to find distance.

    My understanding is that the Wii cameras are I2C, and only aquire 4 IR points? So what you have a total of 8 coordinate points that the Prop would use to calculate depth? That sounds like a piece of cake.

    Imagine one camera fixed looking straight ahead at an IR point. Another camera is offset by 6 inches or so, but angled (<- maybe? could be compensated in software) so that the X,Y coordinate returned the same values as the first camera. It doesn't even need to be exact, you could do much of it in software so that an X/Y offset is applied. Now, just use Pythagorean theorem and monitor the value as you get closer to the IR source. If you periodically associate a known distance to the value returned you can solve for an unknown distance in the future. This just describes tracking one point, the same could be applied to all 4 points.
  • NikosGNikosG Posts: 705
    edited 2011-03-19 03:06
    Hello everybody,

    I think that this topic about how a robot can determine its location is very interesting and very crucial for many projects. The information given above are very interesting and very helpful!
    Reading all this stuff I would like to focus on the issue of IR beacons throughout the navigation area.
    I read about the problems of this method and I was wandering if it would be more effective another type of beacon like the “ultrasound beacons” or simple sound beacons.
    Finally I think that it would be very interesting if anyone could give some examples (links or mini tutorials with images materials and schematics) about how we can build easy and cheap beacons.
  • ercoerco Posts: 20,256
    edited 2011-03-19 10:07
    @Duane et al: The Sharp IR sensors use the parallax effect and have refined it to a high degree. Check this helpful site: http://acroname.com/robotics/info/articles/sharp/sharp.html They detect reflected IR using a CCD array and output an analog or digital signal, all in a self-contained module that sells for as little as $9 at Junun.org . It would be a neat mod to see if you could mod these to use a laser instead of their onboard LED.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2011-03-19 12:01
    erco,

    Interesting idea about using a laser instead of the LED. I have one of these Sharp sensors and lots of lasers (who doesn't like lasers?).

    I've in the middle of building an oven controller to use with the moisture tests I perform on samples. This time of year my day job becomes my evening and weekend job as well. I'm not sure when I'll have time to work on my robots.

    I'll post pictures when I do. One of these days I'll even make a video.

    Thanks for the ideas.

    Duane
  • ercoerco Posts: 20,256
    edited 2011-03-19 14:02
    Check this guy's site about a laser target finder looking for reflectors. Very interesting stuff.

    http://www.philohome.com/sensors/lasersensor.htm
  • Martin_HMartin_H Posts: 4,051
    edited 2011-03-19 18:07
    Wow, some good thinking on that site. He's using an active sensor with passive beacons to fix the robot's location. That seems much simpler than three active beacons plus a sensor.

    He also did that with the Lego RCX system which is not as flexible as the Basic Stamp 2.
  • agfaagfa Posts: 295
    edited 2011-03-19 18:41
    Phil Pilgrim posted this demonstration of combined IR & sonar technique that could be used for robot positioning.

    http://forums.parallax.com/showthread.php?120038-IR-augmented-Echo-location-with-the-Ping)))&highlight=ping

    This is my attempt using the same technique.

    http://forums.parallax.com/showthread.php?122480-Attempt-at-triangulation
  • Martin_HMartin_H Posts: 4,051
    edited 2011-03-20 18:57
    Here's a beacon system using polarized light and two cds cells with polarizers over the sensors: http://www.robotroom.com/Polarizers.html It's quite a clever idea and would probably work with an S1 or S2 as they have three light sensors.
  • ercoerco Posts: 20,256
    edited 2011-03-21 14:38
    Reliability and signal-strength-wise, you're better off going with IR pulsed at different rates for different beacons. The beacon for my Scribbler docking station (attached) sends out a signal that a Scribbler (or BoeBot or any other robot) can easily distinguish from its unique pulse rate, using a simple routine like:

    aaa:COUNT 6,15, B0: DEBUG ? B0 :GOTO aaa

    Changing the value of the 10K resistor between pins 1 & 2 slightly yields different pulse rates, so you could have several different beacons that the robot can navigate to.

    Primary disadvantage is interference from other IR sources, like TV remote controls also based on a modulated 38-40 kHz IR carrier. There are 56 kHz receivers available at http://www.pololu.com/catalog/product/837/resources, but these are still prone to interference from typical TV remotes, which blast an overwhelmingly strong 40 kHz IR signal.
    750 x 720 - 115K
  • Martin_HMartin_H Posts: 4,051
    edited 2011-03-21 19:32
    Ah, I was wondering how to tell IR beacons apart. It's just like light houses, the beacon period and location is the message.
  • ercoerco Posts: 20,256
    edited 2011-03-22 13:28
    PS: I just made that beacon circuit into an IR remote for my balance bot. I have 6 buttons, each which selects a different resistor value, thus generating different IR modulation rates. The Bot's Stamp can COUNT that value in a much shorter time (10 ms or less) than it could decode a Sony IR remote code, which could easily exceed 25 ms.

    Kind of significant, since the servos need refreshing every 20 ms!
  • Spiral_72Spiral_72 Posts: 791
    edited 2011-03-28 11:43
    Hey y'all: I've been working quite a lot lately and haven't had the opportunity to work on this or even consider it, but I plan to get back on it. Heck, come to think of it, I haven't been on this forum or even the internet. Wow.

    Anyways, I purchased a Fairchild Imaging 2048 pixel line scan CCD off ebay for $6..... pretty good and lucky considering they cost >$200 from what I've found! I need a lens of some sort, but with this I should be able to use a laser diode and pick off point distances.

    I wrote a Qbasic program to pattern match a "sweep" of distance data to a known map..... I NEED compass data for it to work though, but that shouldn't be a problem. The compass gives me a heading vector for the match. Matching is possible without the compass, but I can't imagine the algorithm required.. This is all outside the capabilities of the BS2 though, so I've been working on serial communication between the BS2 and the PC. It doesn't work 100% yet, but it's getting there. The main hurdle has been the BS2 echos the RX data back to the PC when I use the SER pins..... which is kind of annoying and takes processing power to keep track of and filter out :(. The alternative is to use a second USB-Serial converter, or an older computer with serial and P0-P15 on the BS2. <sigh>

    I also purchased a RFID kit. It's neat, but probably useless for bot navigation. The read distance is just too short. It could be a secondary location tool I suppose, but I'll put the RFID on the shelf for another project.

    Aside from that, this is all FYI and to let you know I'll research all the suggestions and comments asap.
  • Spiral_72Spiral_72 Posts: 791
    edited 2011-03-28 11:46
    erco wrote: »
    PS: I just made that beacon circuit into an IR remote for my balance bot. I have 6 buttons, each which selects a different resistor value, thus generating different IR modulation rates. The Bot's Stamp can COUNT that value in a much shorter time (10 ms or less) than it could decode a Sony IR remote code, which could easily exceed 25 ms.

    Kind of significant, since the servos need refreshing every 20 ms!

    That's pretty ingenious erco!
Sign In or Register to comment.