PDA

View Full Version : [Question(s)] How to sense terrain



ROBOTMAN
02-06-2009, 12:01 AM
I am having a problem with my robot butler http://letsmakerobots.com/node/1904. It needs to be able to sense the difference between say tile and thick shag carpet. It needs this because it needs to speed up and slow down depending on what type of terrain its on. If the motor speed is configured to run or carpet it goes out of control when it hits hardwood and so on... My point is I need a sensor that can detect what type of terrain it is on but I don't know where to get it.:confused:

Connor
02-06-2009, 12:04 AM
You might try IR sensors. Most of the time, they will return a different value based on the reflective surface they're on. Tile might give one sort of reading (a high range for example) and carpet would give a lower range. Not sure if it'll work.. but, it's worth a try.

Thanks, Connor

lnxfergy
02-06-2009, 12:07 AM
I am having a problem with my robot butler http://letsmakerobots.com/node/1904. It needs to be able to sense the difference between say tile and thick shag carpet. It needs this because it needs to speed up and slow down depending on what type of terrain its on. If the motor speed is configured to run or carpet it goes out of control when it hits hardwood and so on... My point is I need a sensor that can detect what type of terrain it is on but I don't know where to get it.:confused:

No. You need encoders! And closed loop control on your motors, to increase or decrease the motor voltage when speed falls or rises. Problem solved.

-Fergs

ROBOTMAN
02-06-2009, 12:07 AM
Well I am not sure if this count but I tried the phidgets short range I.R. sensor http://www.robotshop.us/phidgets-10cm-infrared-reflective-sensor-1.html and got no results it just gave me a value of 9 every ware.

lnxfergy
02-06-2009, 12:08 AM
You might try IR sensors. Most of the time, they will return a different value based on the reflective surface they're on. Tile might give one sort of reading (a high range for example) and carpet would give a lower range. Not sure if it'll work.. but, it's worth a try.

Thanks, Connor

IR sensors (like GP2D12) would probably be too noisy. While they would give different readings in theory, I think the noise is probably higher than the difference based on surface...

-Fergs

ROBOTMAN
02-06-2009, 12:09 AM
You are right about the encoders to bad it has to be the expensive solution. How much processing power will I need to constantly look for changes in speed though?

lnxfergy
02-06-2009, 12:12 AM
8-bit micro, with hardware interrupts (aka AVR, PIC, even arduino) = done. Encoders can be made for a few dollars. Print out a wheel encoder, get some of these: http://www.junun.org/MarkIII/Info.jsp?item=48 you need one per side (2 per side if you want full quadrature encoding).

I highly doubt you could make this work with Phidgets, and don't even try with a Basic Stamp.

-Fergs

ROBOTMAN
02-06-2009, 12:15 AM
Well than that rules out my bot! So I am done for then?

lnxfergy
02-06-2009, 12:17 AM
How does that "rule out" your bot? It just means you have to add something. Arduino has a USB port. You are developing under python, right? PySerial + USB port on arduino == really easy to talk to the arduino. There is a clear limit to what you can expect to do if you limit yourself to just phidgets as bridgeware.

-Fergs

ROBOTMAN
02-06-2009, 12:21 AM
Ok I do have an old arduino what data should I have the arduino send back? It seams like it might be complicated to keep all the data organized but I only have a small knowledge of usb communications.

Adrenalynn
02-06-2009, 01:17 AM
Zero knowledge of USB required. The only thing USB about it is the plug. It's a serial port. Whatever you print to the serial port on the Arduino shows up on your terminal. Anything you print to your terminal shows up on the Arduino. It's as simple as that.

ROBOTMAN
02-08-2009, 11:36 PM
Do you need full quadrature encoding for mapping? It seems like you wouldn't but I want to make sure.

Adrenalynn
02-09-2009, 12:35 AM
How accurate do you want your map to be? How much do you care about localization?

ROBOTMAN
02-09-2009, 12:39 AM
It is more localization I am worried about. I would say with in 1cm if that's possible. I need it to be able to find it's way from the "living room to the kitchen" with out hitting a wall.

Adrenalynn
02-09-2009, 12:54 AM
Then you're going to be wanting pretty accurate encoders.

In the time we've been debating it on here, you could have designed a circuit board, sent it out, gotten it back, built the wheels from scratch, mounted them, written the code, had it debugged, and be showing it off. ;)

lnxfergy
02-09-2009, 07:47 AM
It is more localization I am worried about. I would say with in 1cm if that's possible. I need it to be able to find it's way from the "living room to the kitchen" with out hitting a wall.

1) Accuracy of plus or minus 1cm is almost certainly not achievable on a low-cost system. Many of the best systems out there are no better than 6-12 inches. Localization can be thought of as a markov process, where each state gets two (additional to the previous state) inputs: a control input (how far we moved) and a sensory update...

2) It's that sensory update that keeps you from hitting a wall -- you can't possibly plan a route from the living room to the kitchen like "move 3 ft forward, turn 72.3degrees left, and move 30ft forward on an arc of radius 287ft". It just won't work, there are too many errors -- in your world map and in the controller/motors themselves. Instead you need to break it down -- "move 3 ft or so forward, following a left wall. Stop when you find the hallway. Then align with the hallway. Go down the hallway, until you reach the 3rd door on the left, which is about 15 feet from where you will start. Turn into the doorway, and navigate to the fridge". In each of those individual instructions the robot would re-localize itself and plan it's short path. Even then, when moving, its continuously using sensors, not the map, to avoid walls. The map just helps plan a feasible route...

-Fergs

ROBOTMAN
02-09-2009, 07:25 PM
I guess I get it now. So say all I need to do is get from point A to point B and have a good enough idea of where I am that I can get back to point A easily, do I need quadrature encoding for that? Sorry if I am bothering you I just want to make sure I do the right thing. I have never used encoders before and never used python to communicate with the arduino.

ROBOTMAN
02-10-2009, 11:29 PM
Communicating with the arduino is easy so far. Thanks for the advice!

ROBOTMAN
03-05-2009, 05:08 PM
The Hamamatsu Photoreflector didn't work I just burned them out when I tried to use them! Dose anybody know where to get a pre made version? I cant solder and I clearly am bad at using bread boards.

ROBOTMAN
03-11-2009, 10:23 PM
Ok I got the photo reflectors working now it is just a mater of code.:)

ROBOTMAN
07-15-2009, 03:50 PM
Where can I find custom made encoder disks?

ScuD
07-15-2009, 03:59 PM
Why would you want those? Out of curiosity..

I don't know where you can find them, but I can imagine it isn't going to be cheap.

Unless you go for the DIY way, but I guess you need high accuracy if you want a custom made one?

ROBOTMAN
07-15-2009, 06:22 PM
DIY isn't working for me the encoders aren't coming out of my printer good. I thought it would be easier to order them online I never though they would be very expensive. My problem is that my printer can't pint on the high quality stiff paper that the encoder should be printed on.

mannyr7
07-15-2009, 06:44 PM
http://www.seattlerobotics.org/Encoder/200010/graphics/disc.gif
Try printing on regular paper, cut out and glue to cardstock.

ROBOTMAN
07-15-2009, 06:52 PM
Never thought of gluing it to the card first I'll try and see how it goes.

Adrenalynn
07-15-2009, 07:41 PM
Go to Kinkos and have it printed on professional grade printers on cardstock for a couple dollars for ten or twenty of 'em. ;) I have a good laser at home, and I don't print anything I care about here. Kinkos does too darned good a job for just about what cost-per-print costs me at home.

ROBOTMAN
07-15-2009, 07:44 PM
That's what I was considering sounds like that's my best bet thanks for the help!:)

ScuD
07-16-2009, 01:12 AM
Whew, I was thinking an aluminum disk with 2000+ lasered engravings ;)