Shop OBEX P1 Docs P2 Docs Learn Events
Maze Navigation — Parallax Forums

Maze Navigation

WipperXXWipperXX Posts: 2
edited 2008-12-16 16:45 in Learn with BlocklyProp
Hello,

For our final paper we are·making a boe bot that can navigate trough a self made maze. However, we have run into some problems. Our strategy was to let the boe bot follow the right wall using the infrared sensors.·The problem is the boe bot wont·make a left turn, the turn it is about to make in the picture. We've also included our script.·Anyone got a suggestion how we can improve·our script / project ?· Thanks in advance smile.gif

Script:
http://home.planet.nl/~door6048/16_december_script.doc

Maze: the robot wont make a 90 degree left turn right now, instead it makes steps

3113115434_1626f4355d_b.jpg

·

Comments

  • WipperXXWipperXX Posts: 2
    edited 2008-12-16 10:18
    By the way, the left infrared sensor points forward to detect if a wall is in front, the right sensor points to the right.

    jumpin.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

    Geen teen -1
  • SRLMSRLM Posts: 5,045
    edited 2008-12-16 16:45
    Ah. Thanks for your second post, I was just about to suggest that. When you post code, please post it as a .bs2 so that it will open in the default editor. Taking a look at your code, I've notice a couple of things:

    -Your turn left function is odd. Logically, it should be the opposite of turn right.
    -Your decision structure doesn't really do very well if both sensors detect an object. It will turn left, then turn right. You can fix this by making it an if - if else - else type statement.
    -You may want to create some sort of wall following code for when it must go forward. Due to real world inaccuracies, I'm guessing that your robot drifts from the wall quite dramatically in some situations.
Sign In or Register to comment.