Shop OBEX P1 Docs P2 Docs Learn Events
Scribbler in a Maze — Parallax Forums

Scribbler in a Maze

WhitWhit Posts: 4,191
edited 2009-11-17 02:34 in Robotics
Hey Everyone,

Check out the Scribbler in this video.

http://www.youtube.com/watch?v=rbcqs1b9oCQ

I am working on·a Maze problem for another Scribbler Camp. The Scribbler's IR detectors don't work well for mazes. I am fixing to try having students write a program to solve a specific maze - that is one·where they can see the maze first and write to solve that maze (not a generic maze, which we could try next). It the Scribbler in this video is not remotely operated - it looks as if it is using an approach like this - I say this because of the very dilberate 180 degree turn. It looks like it is responding to "stalls" at other turns (which I am guessing are also specifically programmed), which is what I wanted to try. I was thinking about going straight until the stall is registered, turn as desired, run straight till stall is received and repeat until the end. My maze would have no condtions like the one in the video where the Scribbler does the 180.

My question for forum members is,·how do you think the Scribbler shown is "solving" the maze? I have never seen anything with the Scribbler that could come close to this result. Or is this just a remote controlled Scribbler? It also runs very straight. Thanks for any help or suggestions.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Whit+


"We keep moving forward, opening new doors, and doing new things, because we're curious and curiosity keeps leading us down new paths." - Walt Disney

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-11-10 03:09
    Hi Whit,

    I'm guessing that the entire sequence is preprogrammed and that the stalls indicate when to change the action, i.e. turn right, turn left, etc. All actions are ended with "go straight" until the next stall. In the GUI, for the actions shown in the video, this would be a very short program.

    This technique would run into trouble with a side exit in the middle of a long hallway, since the proper turn would have to be timed accurately without having the advantage of a stall.

    More difficult would be to program the bot to learn the maze. That would have to done using PBASIC programming and use the EEPROM as a learning memory. But maze learning is not something I have any experience with so, without further study, I wouldn't know what kind of approach to suggest.

    -Phil
  • WhitWhit Posts: 4,191
    edited 2009-11-10 03:29
    Thanks Phil! That ought to make a fun excercise for the students.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Whit+


    "We keep moving forward, opening new doors, and doing new things, because we're curious and curiosity keeps leading us down new paths." - Walt Disney
  • GeorgeCollinsGeorgeCollins Posts: 132
    edited 2009-11-10 03:44
    The scribbler had to have advance knowledge of the maze, because it doesn't make a right hand turn where it could turn or go straight, and then further on in the maze it takes a right hand turn when it could go straight but doing so would lead it into a dead end. It has advance knowledge.

    I would guess the maze is pre-programmed, with a pbasic program that already knows the appropriate width and lengths for the mazes. It would be like forward 4, right 3, left 2. Watch the start of the maze and it should match my annotation. That is about the level of detail that you can store in EEPROM on many STAMPs. It could even be in PBasic code. It still is probably using the IR to confirm when it can take a turn, and when it is hitting a dead end.

    It is possible that the robot tried the maze, learned it and memorized it. If that were true, I think they would show that video as well because it would be very impressive. If it is remembering the maze it is doing so at a very abstract level and with a lot of assumptions about the width of corridors and the unit of corridor length measurement. Otherwise their just wouldn't be enough room in EEPROM to store the measurements.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Robots
  • WhitWhit Posts: 4,191
    edited 2009-11-10 12:40
    GeorgeCollins said...
    ·It has advance knowledge.

    George,

    Thanks for the response. I agree. I think it is programmed for that maze. Even so, it makes the run very cleanly and very quickly. I have seen other Scribbler maze running videos which are almost painful to watch.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Whit+


    "We keep moving forward, opening new doors, and doing new things, because we're curious and curiosity keeps leading us down new paths." - Walt Disney
  • ercoerco Posts: 20,256
    edited 2009-11-10 21:15
    Unusually clean & fast turns. When Scribblers rub against a side wall at a shallow angle, they usually get forced into binding even worse. If this was a stock Scribbler, the programmer did an amazing job!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."
  • WhitWhit Posts: 4,191
    edited 2009-11-11 01:35
    erco,

    Can't wait to see if I can duplicate this. I finished building the maze today (glue is drying). I will post a pic soon and see what sort of results I get.

    I believe you and I reviewed this painful video a while back. http://www.youtube.com/watch?v=L7Xy-l4t_Dw&feature=player_embedded·Though this robot is a not preprogammed for the maze.

    Hope I can do better. I want to have a couple of solutions before I give this to the students.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Whit+


    "We keep moving forward, opening new doors, and doing new things, because we're curious and curiosity keeps leading us down new paths." - Walt Disney

    Post Edited (Whit) : 11/11/2009 1:40:29 AM GMT
  • ercoerco Posts: 20,256
    edited 2009-11-11 04:27
    BRUTAL video; it's like watching a wounded animal try to find an escape route. At least Holly's horse butt robot always has the "end in sight"...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."
  • WhitWhit Posts: 4,191
    edited 2009-11-12 15:51
    erco,

    I think the video is a very early attempt by someone. The Scribbler is using the IPRE Fluke Board. This means that the program is running on a PC (written in Phython) and communicating with the Scribbler via bluetooth. So the program obviously needs a bit of work. No doubt that it was a maze solving program and not just a specific maze running program.

    My maze is now dry, and I will start playing some this weekend. I will keep you all posted.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Whit+


    "We keep moving forward, opening new doors, and doing new things, because we're curious and curiosity keeps leading us down new paths." - Walt Disney
  • ercoerco Posts: 20,256
    edited 2009-11-12 16:22
    Whit: Have you (or anyone else here) done much with your IPRE Fluke Scribblers? It looked like a great package price, but I passed. I knew with my schedule I would never have a chance to explore its potential.

    So much time, so little to do. Oops. Strike that, reverse it.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."

    Post Edited (erco) : 11/12/2009 4:27:55 PM GMT
  • WhitWhit Posts: 4,191
    edited 2009-11-12 17:34
    erco said...
    Whit: Have you (or anyone else here) done much with your IPRE Fluke Scribblers? It looked like a great package price, but I passed. I knew with my schedule I would never have a chance to explore its potential.

    So much time, so little to do. Oops. Strike that, reverse it.

    erco,

    No. I did pick up the IPRE Fluke and played with it a bit, but then got onto something else. It is very interesting and fun to play with. I would recommend it to anyone wanting to try Phython and using a computer to remotely control a robot. The manual seems to be very good also. It is, as you say, just a matter of time managment! I am glad it sitting there, when I have time. If only I did not have to work... smilewinkgrin.gif Honestly though, what I enjoy about robotics is that is so different from my·priestly thing·and gives me a real break when I need it. I also learn so much doing the robotic eduction projects. If I really want to play with the Fluke, maybe I need to teach a class. That gets me really focused, because I have to be ready.

    I would imagine with the new twins, you should say, "So much poo, So little time."

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Whit+


    "We keep moving forward, opening new doors, and doing new things, because we're curious and curiosity keeps leading us down new paths." - Walt Disney
  • ercoerco Posts: 20,256
    edited 2009-11-12 19:06
    Yessir, when I teach Stamps, it definitely keeps me on my toes. Sometimes I'm teaching BS1 and BS2 classes at the same time, and keeping all the commands seperate and correct is a challenge. Good luck with all that!

    BTW, as long as you're teaching about mazes, consider using the same layout as the Trinity Firefighting robot contest. More of a house plan with rooms than a maze, but you'll have the same navigation·challenges, and you might get your students involved in the Trinity contest. That's EXACTLY how I got started!

    http://www.trincoll.edu/events/robot

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."
  • WhitWhit Posts: 4,191
    edited 2009-11-13 12:47
    erco,

    Thanks for the tip on the Firefighting Competition. That really does look fun!

    I've never played with a BS1 - maybe when there is a Daily Deal...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Whit+


    "We keep moving forward, opening new doors, and doing new things, because we're curious and curiosity keeps leading us down new paths." - Walt Disney

    Post Edited (Whit) : 11/13/2009 2:07:19 PM GMT
  • ercoerco Posts: 20,256
    edited 2009-11-13 19:02
    Don't discount the BS1 (except you, Parallax!). I won the very first Trinity Firefighting Robot contest using one in 1994!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."
  • WhitWhit Posts: 4,191
    edited 2009-11-14 23:14
    Hey Guys,

    Well at least I know I can make it·work. It is not always perfect, but it is getting better. This program is written just to solve this simple maze.
    I built the maze for an upcoming Scribbler Camp. I thought the students would have fun trying this.

    Check it out - http://www.youtube.com/watch?v=BTG1dz4fJHA

    And it doesn't get lost!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Whit+


    "We keep moving forward, opening new doors, and doing new things, because we're curious and curiosity keeps leading us down new paths." - Walt Disney

    Post Edited (Whit) : 11/15/2009 12:59:40 AM GMT
  • ercoerco Posts: 20,256
    edited 2009-11-15 02:05
    Sweet job, Whit! You make it look easy, but I suspect there was a lot of software tweaking to get it to run so smooth. What's the secret of your perfect 90-degree turns?

    I just got some $4 short-range IR sensors from Junun. Those might be good for short-range wall detection, will advise when I get to playing with them. You could add those to follow a wall if you want to modify Scribblers, but I suspect you want stock units for your camp. You'll have lots of "happy campers" either way. Well done!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."
  • WhitWhit Posts: 4,191
    edited 2009-11-15 02:49
    erco,

    Thanks for the nice comment. The slight back-up and left or right turn were handled in sub-routines. That way I could adjust the time of the rotation at a certain motor speed. It was a slightly different time on the right and left. Just plain old trial and error. But once I had it, the program returned to the same sub-routine again and again. If it needs adjustment - it is just in one place.

    Some short range IR would be great. The Sribbler "sees" the walls way out - though I might try running forward on time a set period after seeing the wall - that might work.

    Thanks again for the nice words.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Whit+


    "We keep moving forward, opening new doors, and doing new things, because we're curious and curiosity keeps leading us down new paths." - Walt Disney
  • Jessica UelmenJessica Uelmen Posts: 490
    edited 2009-11-16 17:36
    Whit,

    Nicely done! Maze navigation is (in my humble opinion) one of the most frustrating challenges to tackle, simply because there's so many small variables to consider. Add that to the fact that I'm slightly OCD, and every turn has to be perfectly executed, it becomes extremely time consuming quickly.

    But as erco said, your turns were perfect, and all in all, the robot just seemed to flow methodically through the maze. The kids will really enjoy this one!

    -- Jessica

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jessica Uelmen
    Education Department
    Parallax Inc.
  • ercoerco Posts: 20,256
    edited 2009-11-16 17:46
    Of course, the stock Scribbler has line following sensors that could be useful for a line-following maze, such as this ridiculously fast 3-Pi robot: http://www.youtube.com/watch?v=mJV-KDqHgDQ
    And making, changing, transporting·and storing the flat 2D maze would be that much easier.

    Then you can worry less about using the collision sensors and focus on the logic to get thru the maze.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-11-16 18:21
    Whit,

    Very nicely done!

    Erco,

    Since the Scribbler has only two line follower sensors, it probably won't be able to determine what kind of intersection it's reached with any reliability. However, it may be possible to indicate this with barcodes just ahead of each intersection, coming from each direction.

    -Phil
  • WhitWhit Posts: 4,191
    edited 2009-11-17 02:34
    Thanks everyone!

    I also coded this trying to demostrate Program Maker features like Test Condition, Flags, Sub-routines, and using the Leds for program feedback. I have attached my bizzard code for your review. Remeber that this code is to solve this maze only. Enjoy or let me know that I'm crazy.

    I do think a line maze could be fun and I love the bar code idea Phil!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Whit+


    "We keep moving forward, opening new doors, and doing new things, because we're curious and curiosity keeps leading us down new paths." - Walt Disney

    Post Edited (Whit) : 11/17/2009 2:39:57 AM GMT
Sign In or Register to comment.