Go Down

Topic: Pathfinding robot... (Read 7679 times)previous topic - next topic

#15
May 08, 2012, 11:23 pm
The manual for Pololu's m3pi rover includes code for line follower/maze solving.  That code won't just compile on the Arduino, and it also won't just work on a custom built rover, but it's a perfectly valid source for understanding some of the easier methods of line following and maze solving.

simonfrfr

#16
May 08, 2012, 11:27 pm
I love your there are only 2 people who are in this world ones who know binary and ones who don't. Thanks for the response and I'll take a look, its just I kinda need a reference in Arduino because it would help me greatly understand this better. Maze solving as I can see is tricky, but I am not really for the "left turn" algorithm. Thanks Simon. PS: I'm sorry I am a bit tough but I need this to show my buddies when I get to high-school next year Thanks again.

simonfrfr

#17
May 09, 2012, 03:53 am
Ugh this is so difficult

#18

cr0sh

#19
May 10, 2012, 01:02 am
What you are attempting to do is very, very difficult. SLAM is far from a "solved problem". For your small robot, you have a variety of tasks to perform, but it is difficult to say what they are because you haven't really described what your "maze" is going to look like. I have to assume that since you are using an ultrasonic sensor, that you are wanting to have a real maze with walls, correct? Have you built this maze yet?

You need to learn how to get your robot localize itself within that environment. By that I mean, from the robot's experience within the environment, it should be able to take sensor readings and then use that to determine where it is positioned at that moment in time within the environment. Once it knows that (and knows the destination of the goal), you then need to do path planning. Depending on the environment (whether it is a regular grid or not), this path planning can take the form of a discrete algorithm (like the wavefront algo or A*), or it might have to use a continuous algorithm of some sort.

Your robot will also need to be able to sense and understand how far it has gone from one point to another (wheel encoders and the like), along with what direction it is facing. Also note that since such sensors and methods are far from perfect, you are going to have some error in your sensor readings; with that in mind, you need to be able to adjust for this error, and use it to factor in a probabilistic manner your algorithms so that your robot has a sense of not only where it is positioned and how it is oriented in the maze, but to also what degree it believes that it is correct.

I am not an expert on this - far from it. I am merely telling you what I know from what I have read online, as well as what I have learned in the past 4 weeks or so taking the Udacity CS373 class:

http://www.udacity.com/overview/Course/cs373/CourseRev/apr2012

This is -not- an easy class, but it will give you more than enough info to get you on your way with your project, though I am not sure whether you have the mathematical knowledge yet to be able to understand some of the material (exposure to linear algebra and probability/statistics is helpful).
I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

simonfrfr

#20
May 10, 2012, 03:06 am
It's funny because I just learned linear algebra this year (I'm in Eighth Grade) so i could probably do it, and statistics is needed I should be able to figure it out. Thanks for the help. Oh and one more thing, I think I came up with a unique algorithm that works (I tested it out on a video game that I programmed). On the video game it sends "Ray" data (like a sensor) and I figured out how to move it around. I think I may have my algorithm set now in LUA but the next step is transferring. Thanks for the help because since I am only 14, I'll take the course this summer.

simonfrfr

#21
May 10, 2012, 11:30 pm
When I save my data, it goes to a uSD card. What protocol or saving method should I use. (like how should I save it in a file?)

simonfrfr

#22
May 11, 2012, 10:47 pm
Can anyone help me with the SD card datalog?

PaulS

#23
May 12, 2012, 03:31 am
Quote
Can anyone help me with the SD card datalog?

There are examples for reading from and writing to an SD card that come with the SD library. How are your needs different from the examples?

simonfrfr

#24
May 12, 2012, 09:43 pm
What I meant was reading each line and isolating the info needed for a certain procedure.

AWOL

#25
May 12, 2012, 09:49 pm
Quote
isolating the info needed for a certain procedure.

You're going to have to be more specific
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

simonfrfr

#26
May 13, 2012, 01:22 pm
What I mean is, I want the Arduino to find lets say line 25 then pick out words and numbers out of a "sentence" written when the Arduino got all of the information from the outside world. The words and numbers it might pick out are like: wall=true or wall=false another is closest wall=155 or something similar to that. Thanks Simon.

#27
May 14, 2012, 03:24 pm

It is time for you to get started writing some code for us to help you with. Make an effort, show some work, and we will help you get it together.

Start with the most basic parts first then, add features as you get each piece of code to work.
General Arduion tutorials = http://tronixstuff.wordpress.com
http://www.gammon.com.au/forum/bbshowpost.php?bbtopic_id=123

AWOL

#28
May 14, 2012, 03:32 pm
Quote
want the Arduino to find lets say line 25 then pick out words and numbers out of a "sentence" written when the Arduino got all of the information from the outside world. The words and numbers it might pick out are like: wall=true or wall=false another is closest wall=155 or something similar to that.

I don't really know what "line 25" represents in this context.

However, this is microcontroller territory, and they tend to be very constrained, so it's a balancing act between being able to read and interpret what your robot has mapped and done, versus code complexity and memory usage.

Consistency, I'd say, is the key, because you need to be able to unambiguously decode the information you have written.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

simonfrfr

#29
May 19, 2012, 02:51 am
What I meant by line 25 was in a .txt file, you make a grid by having evens x odds y (line numbers). This would make it easier for the microcontroller to find what is to be expected in the area or else it would change the statistic.

Go Up

Please enter a valid email to subscribe