Shop OBEX P1 Docs P2 Docs Learn Events
Penguin Search and Rescue — Parallax Forums

Penguin Search and Rescue

BlaksterBlakster Posts: 1
edited 2012-03-02 04:25 in Robotics
I am in a marine search and rescue outfit and I would like to program my penguin to perform an "expanding box" type search and rescue technique. He would start from the "missing persons" last seen point and go North 2 steps then turn East for 2 steps then South for 3 steps then West for 3 then back North for 4 etc in an ever-expanding box shape. If he detects an object he plays a happy song. I need to have some way of incrementing his step number without writing every line of code as he may have to do hundreds of steps before he finds the "missing person". I also need to have him increment his direction by 90 degrees each leg of the search pattern. Is this all asking too much of the little fellow? Could someone point me in a direction to start(:smile: ha ha don't be a smart alec). Thanks.

Comments

  • Martin_HMartin_H Posts: 4,051
    edited 2012-02-25 16:18
    It sounds like a fun project and sounds doable. I would break it down into separate behaviors and work on them in sequence. I would start with the search pattern without worrying about locating an object or compass heading. I would then elaborate on this behavior by following a compass heading. Continue elaborating until you are done.

    How do you plan to detect the object?

    Feel free to ask for ideas, post your code, or a video.
  • ercoerco Posts: 20,255
    edited 2012-02-28 13:30
    Blakster wrote: »
    Is this all asking too much of the little fellow?

    Perhaps. Penguins are nifty robots, but I don't know if they're accurate enough to track straight, measure distance and turn precisely 90 degrees as required by your spiral search pattern. An S2 is easily up to the task, although its red color isn't too aquatic.
  • Martin_HMartin_H Posts: 4,051
    edited 2012-02-28 18:48
    I figure the migrate north sample would be a good starting point, then tweak it to migrate south when it hits the wall. Since the path won't be exact the penguin should eventually cover most of the search area. The hard part is how to detect an object.
  • HumanoidoHumanoido Posts: 5,770
    edited 2012-03-02 04:25
    Derive an incrementing equation and put it in a loop. Take a look at the programs for Penguin Superhero and the web site for the Penguin Robot Society. Check my signature for a Penguin link leading to many programs for walking, turning, and measuring direction with the built in compass. Object detection works fine with the built in IR transmitter receiver.
Sign In or Register to comment.