Shop OBEX P1 Docs P2 Docs Learn Events
Question for all you PING experts. — Parallax Forums

Question for all you PING experts.

MovieMakerMovieMaker Posts: 502
edited 2009-01-31 01:19 in Robotics
I saw a video recently that made me curious. The robot was looking forward and when the man placed anything (a box, ball, etc. - himself, his hand) in front of the robot, the robot suddenly turned his PingServo to follow the action and the body stayed in the same position,but the ping followed every movement. I would like to see a subroutine of how this could be done. Or, at least point me in the right direction. This needs to be tied into roaming not just a stand alone. You guys are most probably better at pbasic than I am. Although, I am having a lot of fun. I figured I would ask.

As always, thanks for your help in the Past. I can not think of a nicer group of people.


tongue.gif

Comments

  • FranklinFranklin Posts: 4,747
    edited 2009-01-01 21:56
    Can you link to the video?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • MovieMakerMovieMaker Posts: 502
    edited 2009-01-02 00:56


    Hopefully this will work.
  • GWJaxGWJax Posts: 267
    edited 2009-01-02 01:22
    The video of the ping sensing the hand is really using the IR sensors for turning the head around and not using the ping sensor at all until the end of the video when it just runs the ping program and not using the IR sensors else the IR sensor would have picked up the wall when it hit it and would have avoided the wall before the hit.

    But programming the ping to do the scanning and tracking should not be very hard to do though.

    Jax

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If a robot has a screw then it must be romoved and hacked into..
  • MovieMakerMovieMaker Posts: 502
    edited 2009-01-02 01:41
    I think that this is one of the top 5 Cool videos. Too bad the guy doesn't want to share his secrets.

    I built the Eyebrows and it took me 3 days to figure out how to do it. But, I did. Also, my brows are made with black velcro on them, so they look more like brows. My wife has got my camera or I would show you the pix. All I did was take a long strip of aluminum the width of the brows. Then I cut on left and right side and shaped the brows. I covered them with Velcro. Next I folded the whole thing in half and made like a "T" with the whole thing with the brow on each side. I drilled a hole at the bottom and then I fastened it to the servo. That took me three solid days of head scratching. It sure would've been nice if this guy would've shared his idea. But he did not even answer my thousands of requests.

    I am using the basic roaming with ping and introduced my brow program with it. But, it is still a little jerky. I still do not have my IRs working. I bought some Sharp units, but they require an AtoD converter that is on the way. I haven't gotten them yet. So, consiquently, my robot does fine on things the ping sees, but still scrapes the walls until I get the IR working.

    My program is not that smooth. But it would be nice to see some code that will do what was done in the video.


    smile.gif
  • GWJaxGWJax Posts: 267
    edited 2009-01-02 03:03
    ok moviemaker, I do not have the boe-bot but if you pm me I'll give you my e-mail address and send me your code and I'll reprogram it for the ping object tracker for you and leave detailed descriptions on how I do it for you. plus I help you out on the brows as well. What sharp detectors do you have? "part number would be great" because you can use this in conjunction with the RCTIME command if I'm correct but I would need to see the data sheet for it.

    Jax

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If a robot has a screw then it must be romoved and hacked into..
  • MovieMakerMovieMaker Posts: 502
    edited 2009-01-02 04:25
    That sounds like a winner to me. Here is the email I wrote to Andy, but he is too busy:

    I put some eyebrows on the boebot so I could show emotions. I have it hooked to pin three and when I pulsout 15 it will raise and when I pulsout 950, it will lower the brows. I would like to do two things. When ever the robot senses something with the ping , for it to raise it's brows. The next is a little more trouble. When ever it senses something that is close to it, it will raise it's brows. I saw this done on Youtube. Whenever the guy put his hand in front of the ping or placed any object in front of the boebot it would imediately flip that switch.
    I wrote to the guy and literally BEGGED him for the code, but he was not interested in sharing it. I would like to at least be pointed in the right direction. I have the brows installed and operating so far. I have to be careful not to give it the code twice in a row, because the servo will slam into something in it's way. But, a single command, and I am ok.
    Any thoughts on this would be appreciated.
  • MovieMakerMovieMaker Posts: 502
    edited 2009-01-02 04:58
    OH, I was going to say, on the EyeBrows, I have the pin hooked straight up to the cpu pin. Should I go through a 220 ohm resistor or something? It is an output to pin3.

    Thanks!
  • boe-crazyboe-crazy Posts: 53
    edited 2009-01-03 02:57
    If you use a PIR sensor you can have your Pingservo follow it using the pir sensor to decide where the object is or you could just run your ir detectors like a madman.
  • MovieMakerMovieMaker Posts: 502
    edited 2009-01-03 04:08
    Boe

    I do have a PIR sensor,but don't exactly know how to use it. I believe it is made for IR motion detection. I haven't hooked it up yet.
  • boe-crazyboe-crazy Posts: 53
    edited 2009-01-03 04:20
    sorry, i goofed up. I didnt quite understand your question. I just saw the vid and now i get your question. That was pretty cool.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    To make something work one must build, test, and verify bfore proceding.· -- myself
  • OtterOtter Posts: 12
    edited 2009-01-30 20:34
    Hey Crew,

    Yeah, I have to admit, that is the cutest little video. Saying however (GWJax) that it was 'just the IR sensors' still leaves me wondering a bit. How many sensors? What brand of sensors? Were they Parallax? Does anybody have any idea which brands are best? Is there perhaps some clever programatic cooperation between the Ping))) and the IR sensors from which more 'cute' behavior arises?

    -T

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • P!-RoP!-Ro Posts: 1,189
    edited 2009-01-31 01:00
    To me it actually seems pretty simple. There is a ir sensor on both sides of the boe-bot. When one is triggered, the ping moves until it senses the object and stops until the ir sensor no longer detects the object, then it moves back to the original position.

    Are you trying to make eyes that follow an object or are you just going to have it trigger eyebrows and nothing else? If you aren't doing anything but triggering eyebrows your best bet is probably the pir sensor.

    Good luck!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    PG
  • P!-RoP!-Ro Posts: 1,189
    edited 2009-01-31 01:19
    I fond a code I made over a year ago that follows the left side of an object if you would like to see it. It is a little jerky if I remember right but it works well. It's detection is restricted to prevent it from detecting objects farther away (I wrote it in a small cabin on vacation) so if you don't like where it is set you can easily change it. Also keep in mind it is set for a bs2px so you will need to change it for it to run on a bs2.

    Have fun!

    P.S. The code has no documentation and poor use of variables and constants because I wrote it while I was still a beginner.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    PG
Sign In or Register to comment.