Author |
Message |
teejusb
Rookie
Joined: Thu Apr 05, 2012 7:01 pm Posts: 5
|
 Searching for a light source in a Maze
We have been told to create a robot which can navigate a maze and find a light source in a maze. At first I thought this would have been a task of not too much difficulty, but I'm having trouble navigating the maze. The maze is built as shown below.  The black circle is where you start (you are allowed to orient the robot in any direction). and the yellow diamonds are possible placements of the light source. We have to check both of the rooms. I want the robot to navigate the maze without hard coding dimensions. Currently I have 4 sensors in place: a light sensor in the front for detecting the light source, a sonar sensor to see if the robot is approaching a wall, and two EOPD sensors on the left and right sides to search for openings. My main trouble is coding the navigation. I have created a decent light searching algorithm, but the navigation is giving me trouble. Any help at all is welcome!
|
Thu Apr 05, 2012 7:13 pm |
|
 |
RoboDesigners
Novice
Joined: Sat Jul 10, 2010 3:06 pm Posts: 86 Location: Roanoke, VA
|
 Re: Searching for a light source in a Maze
Is this for some competition? It seems to me that there have been a large number of people asking questions about navigation/light-finding recently...  Does the maze *always* look like that? If so, draw out a route. Then, explain in fairly detailed steps exactly what you want the robot to do. Look for places where sensors will return a unique combination of values (i.e. sonar reads x, left EOPD reads y, right EOPD reads z. What is your skill level (generally speaking)? Have you looked up/written wall-following, etc. algorithms? Just some things to start with... //Andrew
_________________Check out my website! www.RoboDesigners.comVRC Team 2190 Twitter: @RoboDesigners
|
Thu Apr 05, 2012 8:23 pm |
|
 |
teejusb
Rookie
Joined: Thu Apr 05, 2012 7:01 pm Posts: 5
|
 Re: Searching for a light source in a Maze
Lol, no it's for a school project xD And yes the maze has been set like that. And yeah, the unique combination thing was the next thing I was actually going to try out. I was just wondering if the users here have any even more efficient method for the problem. Well I code pretty well and efficiently, and although this is the first robotC program I have ever wrote, I am SURE that I could easily create a wall following algorithm using NXT/robotC.
|
Thu Apr 05, 2012 9:15 pm |
|
 |
magicode
Moderator
Joined: Tue Sep 14, 2010 9:19 pm Posts: 496
|
 Re: Searching for a light source in a Maze
Just Google maze solving algorithms, and you'll find a plethora of information on the subject.
_________________ sudo rm -rf /
|
Thu Apr 05, 2012 10:21 pm |
|
 |
teejusb
Rookie
Joined: Thu Apr 05, 2012 7:01 pm Posts: 5
|
 Re: Searching for a light source in a Maze
I did search for some help, but almost all of the ones I found were for to find an exit for a maze, where mine doesn't have an exit. Instead it has to search for a light source. Also mine has a "floating room" so it can't simply follow a wall otherwise it would go in a circle.
|
Thu Apr 05, 2012 10:26 pm |
|
 |
RoboDesigners
Novice
Joined: Sat Jul 10, 2010 3:06 pm Posts: 86 Location: Roanoke, VA
|
 Re: Searching for a light source in a Maze
It can follow a wall... hint: point the robot towards the top of the picture, and mount the LS on the left side of the robot...  //Andrew
_________________Check out my website! www.RoboDesigners.comVRC Team 2190 Twitter: @RoboDesigners
|
Fri Apr 06, 2012 8:22 am |
|
 |
teejusb
Rookie
Joined: Thu Apr 05, 2012 7:01 pm Posts: 5
|
 Re: Searching for a light source in a Maze
I think see what you're getting at, but what if the light source is tucked away in a corner and the light sensor can't detect it? I'm not too sure how accurate the light sensor. Also the walls are white so maybe I don't know how that affects the robot. The hallway separating the rooms containing the light source would probably cause a problem because it would detect the hallway, when we wouldn't want it to go there.
|
Fri Apr 06, 2012 10:22 am |
|
 |
magicode
Moderator
Joined: Tue Sep 14, 2010 9:19 pm Posts: 496
|
 Re: Searching for a light source in a Maze
Here is a simple technique you can use: http://www.societyofrobots.com/member_tutorials/node/94Once you understand how that works, you can move onto more complicated algorithms like using A*.
_________________ sudo rm -rf /
|
Fri Apr 06, 2012 10:29 am |
|
 |
RoboDesigners
Novice
Joined: Sat Jul 10, 2010 3:06 pm Posts: 86 Location: Roanoke, VA
|
 Re: Searching for a light source in a Maze
You're probably right... If the robot was in a completely dark room and the only light in the room was the source in the maze, my idea may work. I think those conditions are a bit unrealistic, though...  I have a question... why don't you want to "hard-program" the distance values? //Andrew
_________________Check out my website! www.RoboDesigners.comVRC Team 2190 Twitter: @RoboDesigners
|
Fri Apr 06, 2012 10:53 pm |
|
 |
teejusb
Rookie
Joined: Thu Apr 05, 2012 7:01 pm Posts: 5
|
 Re: Searching for a light source in a Maze
Because our teach says we aren't allowed to. A little hardcoding is acceptable, but not hardcoding a specific path and such.
|
Fri Apr 13, 2012 8:18 pm |
|
|