coordinates
Sat, 01/30/2010 - 17:17
how can i make my bot to remember a coordinate on its path
that it has already traversed...
m abegginer so kinly help me...

bOtskOOl website by bOtskOOl is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 2.5 India License.
Permissions beyond the scope of this license may be available at http://www.botskool.com/contact.
bOtskOOl.com Privacy Policy - bOt-Xchange Product Listing Policy - Intellectual Property Rights (IPR) Protection Policy

I'm assuming that there is a black and white grid, you know how to work with IR sensor and you are also tracking the relative motion of the bot i.e. in which direction your bot is moving.
Now Once you put you bot in the arena or black and white grid or rather matrix track.. the bot should know in which matrix position it has to start with. The idea is to create a 2d array where we are going to put the values like first we will initialize all array values to zero(0) , one (1) for the current matrix cell. As i said we are going to keep track of the motion of the bot, so when the bot already crosses or traverses a particular cell we will change its value to, say 2...
0-cell not yet checked
1-current cell (bot position)
2-cell checked
use other values to locate your object etc or use 3d array to make your program better..
So now we can write complete algorithm to track the coordinate of the robot with 2d array (x,y) acting as co-ordinate position and now we have the whole image of the trajectory of the bot...
Note: Place your IR intelligently so that when bot changes its grid say from black to white it should be also able to track its direction also.
Don't hesitate to ask your doubts..
Njoy robotics!
i am not getting the logic that how my bot will remeber the coodinates that my bot will traverse.
please help me ,clearing my dougt........
i am working on my bot using 8051....
hi hitesh!
i hope you know how to write codes in c language right ( or assembly )
It is important to know whatever i have written above is for a predefined chess board like track and its just the basic idea....
Let me make it simple for you .. Think of a track like matrix.. and co-relate it with an array..or array of memory locations..so we are actually playing with the values of the every matrix cells or arrays or memory locations.. recall pacman video game which we used to play when we were kids or google it..so when bot is inside any cell or a coordinate position or array location/ leaves the cell.. we change the value of the unexplored or explored cells
0-unexplored cells: initialized or initially we set it to zero
1-bot location or position: when the bot enters a cell location
2-explored cells:when bot has left the cell..so that bot should know it has to explore the unexplored cells only..
but if the track doesn't have a predefined path like chess board or the bot has to explore or solve a maze then you need to think of better method..
let me know your problem statement or your event link!!