Shop OBEX P1 Docs P2 Docs Learn Events
A wall follower. Stay inside the box, dude. — Parallax Forums

A wall follower. Stay inside the box, dude.

Roger LeeRoger Lee Posts: 339
edited 2012-06-05 13:42 in Robotics
A little forward progress. This guy can now go around some shapes that may be found in a regular maze.
90 degree inside and outside turns are no sweat.

[video=youtube_share;FeLu-lx3COI]


Here is the code running in the above video.

Comments

  • mindrobotsmindrobots Posts: 6,506
    edited 2012-05-29 19:56
    Well done!!
  • ercoerco Posts: 20,255
    edited 2012-05-29 20:29
    That's quite impressive, your bot makes it look easy. But like many other things, I'm sure it's much harder than it looks!
  • Roger LeeRoger Lee Posts: 339
    edited 2012-05-29 20:38
    Thanks Rick and erco, I have my hair pulling moments, for sure.
    Once the speech recognition was working it all came together very nice.
    Now I just say "follow the right hand wall".

    but seriously, I could not have done this without the great objects in the OBEX.
  • TtailspinTtailspin Posts: 1,326
    edited 2012-05-29 20:53
    Way cool Roger. :thumb::thumb:

    Would love to see how you put together all the code from the OBEX.

    -Tommy
  • Martin_HMartin_H Posts: 4,051
    edited 2012-05-30 02:57
    Well done. Besides mazes, wall following is a really useful navigation skill for an indoor robot.
  • ercoerco Posts: 20,255
    edited 2012-05-30 03:35
    Follows pretty smoothly without overshoot. Are you using a PID routine, Roger Lee?
  • dgatelydgately Posts: 1,629
    edited 2012-05-30 06:25
    Roger Lee wrote: »
    but seriously, I could not have done this without the great objects in the OBEX.

    So smoothly done! I call that "museum mode" navigation. Enter the museum, keep taking all opportunities to go right until you've visited every exhibit...

    Yes, as others have said, would like to know how you put all of the OBEX software pieces together. Your bot appears to spend no time in transitions between moving forward and changing direction. My robot still takes time in that respect :-(

    Thanks for a great example of what can be done. Now, I need to put effort into making my bot work as smoothly as yours!

    dgately
  • ercoerco Posts: 20,255
    edited 2012-05-30 09:18
    OK, now that kudos have been piled high on the Prop & Obex, I'll be needing to try this with a BS2.

    That's just my way! Martin_H is already under way: http://forums.parallax.com/showthread.php?139717-Erco-s-Oval-Office-Challenge&p=1094588&viewfull=1#post1094588
  • Martin_HMartin_H Posts: 4,051
    edited 2012-05-30 16:58
    Erco, thanks for posting the link. The code is available in this thread :

    http://forums.parallax.com/showthread.php?139096-Wall-Following-Examples-(video-and-code)

    I made it as simple as possible, so that it could be an example for the expo and my son's scout den. I didn't use encoders which would make right angle turns and straight travel a snap.. If I do adapt it into a wall maze follower, those additions would be great.
  • Roger LeeRoger Lee Posts: 339
    edited 2012-05-31 16:17
    I'm just cleaning up some obvious oversights is my code, then will post it here for all to see.

    Not using PID control now. Just using preset amounts of turn arc based on measured distance from wall.
    So it is using an error from the ideal distance. The error is not fed back in to calculate a proportional amount of turn.
    It actually worked out better than I expected.

    Absolutely no way this can be done with a BS2. No way, no how! :innocent:
    (erco, Is that what you were looking for?)



    code added to post number one.
  • ercoerco Posts: 20,255
    edited 2012-06-04 10:23
    Roger Lee wrote: »
    Absolutely no way this can be done with a BS2.

    OK, OK. Beating this guy might call for a Propeller. He keeps going faster & faster (amazing 4.693 fastest time at 1:35 into the video) until he loses traction and wipes out in his last two runs. WOW.
  • Roger LeeRoger Lee Posts: 339
    edited 2012-06-05 13:42
    Those micromouses (micromice? that doesn't sound right either) are absolutely amazing.
    I'm sure we are talking hundreds of hours of testing, testing, and more testing.

    Heck, my battery pack has more mass than that whole machine.
    Beating this guy might call for a Propeller.

    I've seen enough of your work to know you could do this. Any flavor of Basic Stamp OK my me.
    My last post was put out there not as doubt, but to give you a reason to do it. Go for it, man.

    Roger.
Sign In or Register to comment.