Shop OBEX P1 Docs P2 Docs Learn Events
width of an object with a ping? — Parallax Forums

width of an object with a ping?

RontopiaRontopia Posts: 139
edited 2007-11-26 23:03 in Robotics
have any of you tried to use a ping to figure out how wide some obstical is?

mabe im thinking wrong.. would it be better to ping in several degree's and save each to find edges of an object? thats a lot of ping's. is there a better way? actually im sure there is I just dont know it.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔



IC layout designer
Austin Texas

Comments

  • FranklinFranklin Posts: 4,747
    edited 2007-11-26 21:09
    As designed the ping will read the reflection from the first flat surface it encounters. I'm not sure how you would see the other edge.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2007-11-26 21:26
    Adding to the complication for your app, the Ping))) also has a rather wide radiation/acceptance pattern. You'd have to rotate well beyond an edge for the object not to register.

    -Phil
  • RobofreakRobofreak Posts: 93
    edited 2007-11-26 23:01
    If you were to use an infrared ranger, like the Sharp, which has a pretty narrow acceptance range, mounted to a servo to scan back and forth for an object.·Asuming you're using a BASIC Stamp,·you could tell it to add to a counter every time it loops and it sees the object, and when it doesn't see an object, it'll stop counting, and, judging by the values of the counter, and knowing the speed at which the servo turns, you can identify how wide the object is...

    Hope this helps!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Austin Bowen,

    Robo-freak.com

    "One must watch out for mechanics. They start out with a sewing machine, and end up with the atomic bomb"

    Post Edited (Robofreak) : 11/28/2007 6:26:50 PM GMT
  • ZootZoot Posts: 2,227
    edited 2007-11-26 23:03
    Andy Lindsay's Find Closest Object might be a good place to start -- basically he has the Boe-bot scan from left to right, then back again, looking for "edges" -- when two edges are found (since his program calculates angles in brads + distance in cm.) you could get a *rough* width with simple trig:

    http://forums.parallax.com/showthread.php?p=590119

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST
Sign In or Register to comment.