Scribbler 2 Enhanced Obstacle Avoidance (Video)

After Mark pointed out the problems of using a Ping with the S2, I tried adding my MaxBotix LV-EZ0 ultrasound sensor to the S2.

I found the weakness with the ultrasound was its inability to see our couch. I changed the original program to keep track of how long it had been since the previous obstacle so if the robot encountered the same obstacle twice it would head off in the opposite direction.

I posted my very first YouTube video of the robot avoiding a few obstacles. (I'm going to see if I can embed it here. Now it works.)

[video=youtube_share;UFIYyVZmOzg]

The S2 periodically plays a note. The pitch of the note is dependent on the range detected by the ultrasound sensor. The S2 will play high pitched notes when the range is close. The interval between notes also decreases for close range readings.

As the program is now, the robot speeds a lot of time driving across the room it's in. I might modify the program latter to follow a wall or to try to find the farthest point away from its starting position.

I'm pleased with the program so far.

In the video, both the serial pin and the analog pin on the MaxBotix sensor are connected to the S2. The attached program only uses the information from the serial pin since it has better resolution than using the S2's ADC method.

Edit(3/11/15): Warning, the code attached is an old version. There are likely better options available.
I plan to upload this program or an improved version to my GitHub account
If there isn't code similar to what is attached here on my on GitHub, send me a message and I'll make and check for any improved versions of the code.

Comments

  • 11 Comments sorted by Votes Date Added
  • edited January 2012 Posts: 8,869Vote Up0Vote Down
    Save a spot for other information.
  • edited January 2012 Posts: 0Vote Up0Vote Down
    Thats good stuff. :thumb::thumb:

    S2's are the most beepingiest noise making little things.. Smart, but noisy..:smile:

    -Tommy
  • edited January 2012 Posts: 8,869Vote Up0Vote Down
    Ttailspin wrote: »
    Thats good stuff. :thumb::thumb:

    S2's are the most beepingiest noise making little things.. Smart, but noisy..:smile:

    -Tommy

    There's a line in the code:
    s2.set_volume(_Volume)
    

    I presently have the volume set to 50 but if I think I'm disturbing my wife, I'll change it to 5.

    I'm working on a robot remote right now. One things I'd like to be able to control remotely is the volume of robot.

    I used the Scribbler 2 GUI to generate code to produce the sounds. I'm pretty sure the volume control slider in the GUI doesn't affect the volume of sound made by the robot. The volume needs to changed inside the Spin code.
  • edited January 2012 Posts: 0Vote Up0Vote Down
    Sweet! And quite an advantageous location for the sign proudly bearing the prestigious DEGN moniker!
    Now where are my Robotics forums? :)
  • edited January 2012 Posts: 0Vote Up0Vote Down
    Great work! (once again)

    It's interesting how the ultrasound thinks the couch it doesn't very well see is even a clearer path than the wide open spaces behind it.

    (yes, the S2's can beep and squawk a lot! I'm picturing Phil and "poor" Browser during testing and development!)
    MOV OUTA, PEACE <div>Rick </div><div>"I've stopped using programming languages with Garbage Collection, they keep deleting my source code!!"</div>
  • edited January 2012 Posts: 8,869Vote Up0Vote Down
    erco wrote: »
    Sweet! And quite an advantageous location for the sign proudly bearing the prestigious DEGN moniker!

    That wasn't on purpose. A neighbor gave that to us for Christmas(maybe this year?). We babysit her kids every so often so she made it as a kind of "thank you" gift (I think). It has the phrase "where love is" across the front in smaller white letters. Maybe I could get her make one with "where robot are" for us too.

    Her ten year old son (her oldest child) comes over on Saturday sometimes to discuss his latest ideas on the robot he whats to make. I believe the current plan it to have the robot spray weed killer on weeds and scoop the dog poops in their back yard. I'm under the impression he's responsible for removing weeds and and other undesirables from the backyard.
  • edited January 2012 Posts: 8,869Vote Up0Vote Down
    mindrobots wrote: »
    Great work! (once again)

    It's interesting how the ultrasound thinks the couch it doesn't very well see is even a clearer path than the wide open spaces behind it.

    (yes, the S2's can beep and squawk a lot! I'm picturing Phil and "poor" Browser during testing and development!)

    Thanks Rick.

    Yes, the ultrasound doesn't just pass through the material of the couch, it's absorbed by it. The couch is just barely too high for the IR sensor to see. When the ultrasound sensor compresses the material, it can then see the frame underneath.

    All the sounds made by the S2 in the video are sounds I added. I removed the original sounds in the object avoidance program. I used the sounds as a debugging aid. I can tell what part of the program is being executed based on the sound the S2 makes.

    The search for a clear path would go a lot faster if I removed the sounds (or at least didn't require the S2 to wait for one sound to finish before playing the next).
  • edited January 2012 Posts: 0Vote Up0Vote Down
    Cool modification of the S2.

    The IR sensors on the Scribblers are pretty low to the floor, and they often miss things that don't go all the way to the floor. We've had our S1 end up under the bed, couch, end table, etc. Then it gets wedge and the stall sensor kicks in.
  • edited January 2012 Posts: 8,869Vote Up0Vote Down
    Martin_H wrote: »
    Cool modification of the S2.

    The IR sensors on the Scribblers are pretty low to the floor, and they often miss things that don't go all the way to the floor. We've had our S1 end up under the bed, couch, end table, etc. Then it gets wedge and the stall sensor kicks in.

    Thinking it would make a better video, I started to enclose part of our living room with boxes and sheets of stiff plastic so the S2 would hit an obstacle more frequently. I found artificial environment is just about perfect for the S2's IR sensors and the ultrasound sensor was rarely triggered. I think the ultrasound really shines with detecting furniture legs. The IR sensors seem to have a hard time seeing furniture legs. So I abandoned the artificial setup and started the video with the S2 headed for some furniture with legs (and a nice "DEGN" sign).

    Our kitchen is a great room for showing off the S2's IR sensors. The room has nice flat, light colored, walls. The ultrasound rarely has a chance to help avoid a wall in the kitchen.
  • edited January 2012 Posts: 0Vote Up0Vote Down
    That's really nice.it gives the robot pretty good navigation
Sign In or Register to comment.