Shop OBEX P1 Docs P2 Docs Learn Events
Ping and Couches, Chairs, and Carpet — Parallax Forums

Ping and Couches, Chairs, and Carpet

Bill ChennaultBill Chennault Posts: 1,198
edited 2007-11-05 16:13 in BASIC Stamp
All--

What will Ping)) tell me about fabric-covered couches, chairs, and carpet? All I want to do is avoid HITTING a couch or chair, so just a few inches alert is good enough. I would like to be able to use Ping)) looking straight down to indicate when the the skid-steer--Ugly Buster!--is about to run off the floor and fall down the stairs.

Thanks!

--Bill

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You are what you write.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-11-02 15:32
    I can't tell you from experience, but I suspect that the fabric itself and padding beneath it will do a pretty good job of absorbing the sound from the PING. The wood frame underneath will probably reflect the ultrasound, but how much will depend on the specifics of the construction. Do some experiments with the actual furniture with the PING, an LCD and a Stamp running off a battery to see what the detection distance is.

    I suspect for the "drop off" detection that either a PING or an IR distance sensor would work unless you have carpeted stairs. Still, the distances are short and either might work. The trick is to get the sensor mounted far enough ahead of the Buster to see the drop off in time to stop.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-11-02 16:21
    Bill,

    You may need to include IR sensors fused with the PING))) readings to catch things the PING))) may miss due to surface composition or angle. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • Bill ChennaultBill Chennault Posts: 1,198
    edited 2007-11-02 16:24
    Mike and Chris--

    Thank you. I will experiment. Ugly Buster can stop very fast, so just a little notice might be sufficient.

    --Bill

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    You are what you write.
  • Steph LindsaySteph Lindsay Posts: 767
    edited 2007-11-02 16:41
    Ken Gracey discovered during a demo at his son's grade school that certain furry stuffed animals were all but invisible to the Ping))). But furniture's hard core under the fabric might fare a bit better, I'll be interested to hear about your tests. I agree with Chris about the IR backup, that's worked well for bots roaming around our cubicles. The Ping's close-range limit is about 2 cm I think - what's the clearance under Buster?

    -Stephanie
  • Bill ChennaultBill Chennault Posts: 1,198
    edited 2007-11-02 16:52
    Stephanie--

    Ugly Buster has two inches of ground clearance. I will be sure to report results of my experiments.

    --Bill

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    You are what you write.
  • Steve JoblinSteve Joblin Posts: 784
    edited 2007-11-02 17:15
    I've found that IR tends to be a bit more "accurate" for basic object detection... you can sometimes get "false readings" from ultrasonic sensors so you need to take several readings and average out the results... depending on the speed of Ugly Buster, you will likely find that IR works faster and indicating an object. You can "tune" the sensitivity of the IR modulated frequency or use different resistor values to get triggering at different distances... check out http://forums.parallax.com/showthread.php?p=561496 for a great "Stamps In Class Mini Project".
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-11-02 17:44
    One thing I have started using recently is a kind of filter. This can work in conjunction with the running average (I have tried it), but I find for my own uses it is not necessary. I am usually looking for an object to avoid. But for either use here is the basic concept…

    For each reading you get (including averaged readings) you set a threshold where if the reading is outside of that range it is ignored as a bad reading.· This threshold is in relation to the previous final value.·This has to be done before the next reading is averaged so you can ignore these extreme limit readings. The gap for the threshold really depends on whether you’re using the raw data or calculating distance first. Here’s a kind of pseudo-code procedure:

    - Get sensor data
    - Convert reading to inches/cm if needed
    - Is current reading outside threshold of previous reading +/-
    - If yes ignore current reading and start over
    - If no then average with previous reading
    - Make navigational decisions here

    The next thing is that when using the HB-25 or any other device that doesn’t require the BASIC Stamp to do refreshing, you have extra time to handle these extra tasks.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • Steve JoblinSteve Joblin Posts: 784
    edited 2007-11-02 20:17
    Interesting approach Chris... I remember reading a tutorial somewhere that used a "bubble filter"... the idea was to take several readings, then sort them high to low, then eliminate the highest and lowest values, then average the remaining items. They called it a "bubble" filter because during the sorting process, you could imagine the individual items being resorted with the highest value rising to the top like bubbles in soda.
  • Bill ChennaultBill Chennault Posts: 1,198
    edited 2007-11-02 21:14
    All--

    Thank you for all the good ideas! I imagine I will try all, or most of·them. Using Ping)) in conjunction with an IR device sounds like a place I might start. If EITHER one says there is something dead ahead, "stop and think."

    --Bill

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    You are what you write.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-11-05 16:13
    Steve,

    Yes, we used to use Bubble Sort and Trickle Sort to alphabetize string data…These are the same except the order. Then there was heap sort and some other methods. In this case though I immediately eliminate what I consider bad readings and average the rest. The algorithm is made slightly more complex by the fact that it has to account for something suddenly showing up at close range. In this case one reading is lost, but at the speed we’re talking you wouldn’t even notice it. There are merits to your concept because it would avoid some of these exceptions. It’s always the exceptions that hang people up when trying to implement a concept. But writing an example is difficult because of the unique nature of the code to the application. Still, I will post what I have when I finish with the robot a recently posted a picture of. It uses the above concepts. Take care.

    P.S. - I don't have the sensor fusion concept hammered out myself.· Still trying to figure out how to best implement it.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
Sign In or Register to comment.