Pages: 1 [2] 3   Go Down
Author Topic: Pathfinding robot...  (Read 3158 times)
0 Members and 1 Guest are viewing this topic.
New Hampshire
Offline Offline
God Member
*****
Karma: 13
Posts: 779
There are 10 kinds of people, those who know binary, and those who don't.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged


FL
Offline Offline
Newbie
*
Karma: 0
Posts: 34
Its not that I can't explain it... Its just you wouldn't understand.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I love your there are only 2 people who are in this world ones who know binary and ones who don't. smiley-grin 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.
Logged

FL
Offline Offline
Newbie
*
Karma: 0
Posts: 34
Its not that I can't explain it... Its just you wouldn't understand.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Ugh this is so difficult
Logged

FL
Offline Offline
Newbie
*
Karma: 0
Posts: 34
Its not that I can't explain it... Its just you wouldn't understand.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Please help?
Logged

Phoenix, Arizona USA
Offline Offline
Faraday Member
**
Karma: 36
Posts: 5519
Where's the beer?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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).
Logged

I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

FL
Offline Offline
Newbie
*
Karma: 0
Posts: 34
Its not that I can't explain it... Its just you wouldn't understand.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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. smiley-grin
Logged

FL
Offline Offline
Newbie
*
Karma: 0
Posts: 34
Its not that I can't explain it... Its just you wouldn't understand.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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?)
Logged

FL
Offline Offline
Newbie
*
Karma: 0
Posts: 34
Its not that I can't explain it... Its just you wouldn't understand.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Can anyone help me with the SD card datalog?
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 551
Posts: 46266
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

FL
Offline Offline
Newbie
*
Karma: 0
Posts: 34
Its not that I can't explain it... Its just you wouldn't understand.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

What I meant was reading each line and isolating the info needed for a certain procedure.
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 240
Posts: 24465
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
isolating the info needed for a certain procedure.
You're going to have to be more specific
Logged

"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.

FL
Offline Offline
Newbie
*
Karma: 0
Posts: 34
Its not that I can't explain it... Its just you wouldn't understand.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Greenville, IL
Offline Offline
Edison Member
*
Karma: 11
Posts: 1310
Warning Novice on board! 0 to 1 chance of errors!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


  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.
Logged


Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 240
Posts: 24465
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Normally, I'd advise representing information in as human-readable form as possible.
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.
Logged

"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.

FL
Offline Offline
Newbie
*
Karma: 0
Posts: 34
Its not that I can't explain it... Its just you wouldn't understand.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: 1 [2] 3   Go Up
Jump to: