I decided to add a little directional bias in the algorithm. By giving the robot an orientation, I was able to favour paths ahead of the robot when faced with choices where other directions have the same distance to the destination.
It changed the path travelled while mapping only a little - I modified my maze to include multiple pathways, and here is the result:
So at least now the robot has the ability to turn... Which s great really since it actually needs to be able to do that in the actual maze!
Going to give this project a break for a couple of days now, I have a few other things to do - like revision :3
Wednesday, 20 April 2011
Micromouse - Mapping
Yesterday I sat down and wrote the route planning / mapping algorithm for the bot. I've taken away the simulated sensors and bot, and just focused on getting the planning out of the way.
I'm essentially using a flood-fill algorithm based on the sensor data the robot has acquired.
Video of it in action:
While mapping, the maze is continuously updated based on the available routes, with the shortest path prevailing at the end.
Grey walls are the maze walls, and red walls are walls the robot has detected.
Of course, the shortest route isn't always the fastest, so the next step will be analysing the routes and deciding on the fastest... but for that, I need a robot to get some movement data on.
I'm essentially using a flood-fill algorithm based on the sensor data the robot has acquired.
Video of it in action:
While mapping, the maze is continuously updated based on the available routes, with the shortest path prevailing at the end.
Grey walls are the maze walls, and red walls are walls the robot has detected.
Of course, the shortest route isn't always the fastest, so the next step will be analysing the routes and deciding on the fastest... but for that, I need a robot to get some movement data on.
Friday, 15 April 2011
Micromouse
Since next year we'll be working on a micromouse, and it appears to be quite challenging, I decided I'd get an early start on mapping the maze. For this I've decided to create a simple simulation of the maze, a bot, and sensors.
I've used Processing for this, since it's a quick way for me to create a visual representation of the challenge. I've been working on it this week during lunch breaks, and have so far got as far as creating the maze, some simulated sensor values, and a little navigation.
As the bot explores, it marks where it has travelled on the map. According to the rules of micromouse you cannot tell the robot where you are starting, but since the first turn determines your position relative to the maze, it's simple enough to figure out.
To create the visual feedback of the mapping, I've "told" the robot its orientation, otherwise it wouldn't know which cells on my map to mark as visited. This doesn't actually affect the bots mapping, it's just so I can see the progress as it happens really.
I'm not detailing everything just yet, but I'll keep you posted (Seriously.)
I've used Processing for this, since it's a quick way for me to create a visual representation of the challenge. I've been working on it this week during lunch breaks, and have so far got as far as creating the maze, some simulated sensor values, and a little navigation.
As the bot explores, it marks where it has travelled on the map. According to the rules of micromouse you cannot tell the robot where you are starting, but since the first turn determines your position relative to the maze, it's simple enough to figure out.
To create the visual feedback of the mapping, I've "told" the robot its orientation, otherwise it wouldn't know which cells on my map to mark as visited. This doesn't actually affect the bots mapping, it's just so I can see the progress as it happens really.
I'm not detailing everything just yet, but I'll keep you posted (Seriously.)
Monday, 13 December 2010
Lights and Ranting
Almost finished with the first semester, and looking back it really hasn't been difficult. I think I need to just manage my time a little better and I'll get through it no problems.
Had my electronics exam today and had to hand in my digital systems development lab book. Thankfully I was on top of my DSD (for the most part at least,) so it only required a couple of hours of writing up this morning. Electronics wasn't nearly as bad as I'd imagined. I basically spent the weekend not revising when I shoud have been, but I think I managed over 50%, which I'll be ok with.
AI I got 80% on my first try, 70% on the second (I get the highest mark, so 80%)... something wrong there lol. I thought I understood the terminology used, but the way the questions were worded left me stuggling to answer them. Oh well...
Meh, I won't really be happy with any of the marks this semester. I need to knuckle down and get on with things. I have my electonics lab book to write up and hand in for Friday then I'm done for a couple of weeks. I'll likely spend the holidays getting a head-start on the next C assignment and studying for the DSD and DDI exams in Jan.
I did do one semi-productive thing for Tyler - made some flashing LED lights for his mini christmas tree. Two cables each containing 5 resistors and LEDs in parallel hooked up to a simple circuit of two transistors, two resistors and two capacitors. I taped the cables together so he has one cable with ten lights. Gotta hook it up to a battery and solder the circuit to finish the job, which I'll do once I get this lab book done then put a pic up or something...
PS. Sorry this entry was more of a rant about how unhappy I am with my performance than anything else. :)
Had my electronics exam today and had to hand in my digital systems development lab book. Thankfully I was on top of my DSD (for the most part at least,) so it only required a couple of hours of writing up this morning. Electronics wasn't nearly as bad as I'd imagined. I basically spent the weekend not revising when I shoud have been, but I think I managed over 50%, which I'll be ok with.
AI I got 80% on my first try, 70% on the second (I get the highest mark, so 80%)... something wrong there lol. I thought I understood the terminology used, but the way the questions were worded left me stuggling to answer them. Oh well...
Meh, I won't really be happy with any of the marks this semester. I need to knuckle down and get on with things. I have my electonics lab book to write up and hand in for Friday then I'm done for a couple of weeks. I'll likely spend the holidays getting a head-start on the next C assignment and studying for the DSD and DDI exams in Jan.
I did do one semi-productive thing for Tyler - made some flashing LED lights for his mini christmas tree. Two cables each containing 5 resistors and LEDs in parallel hooked up to a simple circuit of two transistors, two resistors and two capacitors. I taped the cables together so he has one cable with ten lights. Gotta hook it up to a battery and solder the circuit to finish the job, which I'll do once I get this lab book done then put a pic up or something...
PS. Sorry this entry was more of a rant about how unhappy I am with my performance than anything else. :)
Tuesday, 7 December 2010
Welcome!
It's been a few years since I have blogged anything at all, so I decided I would start a new one (Honestly, I can't remember where my old one is located.)
So first of all, I'm Daniel Davies, a 1st-year robotics undergraduate at the University of the West of England, Bristol. I've been interested in robotics and software development for several years, and decided I'd give it a go. Last year I completed an Access to HE diploma, which allowed for me to apply for a position at UWE this year. Originally I was going to study computer science, but after researching UWE's robotics lab and seeing it for myself, I changed my mind.
Well it's almost the end of the first semester, so once I have finished the assignments due in on Thursday, I will start posting a few entries about what I did, and any projects I decide to work on over the holidays. I'll start with a small write up on this little Lego Mindstorms NXT hexapod:
Thanks for visiting, and check back soon - you might see something of interest!
So first of all, I'm Daniel Davies, a 1st-year robotics undergraduate at the University of the West of England, Bristol. I've been interested in robotics and software development for several years, and decided I'd give it a go. Last year I completed an Access to HE diploma, which allowed for me to apply for a position at UWE this year. Originally I was going to study computer science, but after researching UWE's robotics lab and seeing it for myself, I changed my mind.
Well it's almost the end of the first semester, so once I have finished the assignments due in on Thursday, I will start posting a few entries about what I did, and any projects I decide to work on over the holidays. I'll start with a small write up on this little Lego Mindstorms NXT hexapod:
Thanks for visiting, and check back soon - you might see something of interest!
Subscribe to:
Posts (Atom)
