Welcome, Guest. Please login or register.
Did you miss your activation email?
February 09, 2012, 07:06:23 AM
Home Help Login Register
News: Any Problems or Experience with Industrial Robots ?
Register and place your Question / Answer to worldwide Robotexperts right here !

+  Robotforum | Support for Robotprogrammer and Users
|-+  General Category - Industrial Robot Forum
| |-+  Robot Geometry, Linear Algebra, Forward and Inverse Kinematics
| | |-+  help with cartography! euclidean distance algorithm PLZ HELP!!!
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: help with cartography! euclidean distance algorithm PLZ HELP!!!  (Read 1565 times)
spgr
Guest
« on: February 17, 2010, 05:56:02 PM »

cartography robot euclidean shortest path help!!!?
please help me solving this simple example in robot cartography...

i dont know exactly how the algorithm works!!

lets say we placed a robot in a room and the robot took these measurements for 6 spots:

a = [3 5 9 8 2]
b = [4 6 6 9 9]
c = [1 2 2 3 1]
d = [8 9 2 8 2]
e = [6 3 7 8 3]
f = [9 9 9 9 9]
in order to go from a to e, how the algorithm of euclidean distance will work??

lets assume that spot A connects to B and C, and B connects to D and E, and also C connects to D and E.
and finally D connect to F and also E connect to F

can you please tell me step by step what calculations will the robot do to go from A to F???

please help me!!!!
Logged
spgr
Guest
« Reply #1 on: February 17, 2010, 08:58:07 PM »

ADDITIONAL EXPLANATION

Lets assume there is a robot in a room, and for every position in the room (a,b,c,d,e,f) the robot performs a scanning around it with a sonar to see if there is any obstacles. if the value is low, then there is an obstacle (low value means the sound from the sonar got back quickly, high value means that the sound from the sonar traveled longer distance before it went back to robot so there is not obstacle). the robot took 5 measurements for every position (a,b,c,d,e,f) . at the end there is that array i wrote, and then you place the robot at the position a, and you want to go to position f. so the robot must calculate which path to choose. i know that euclidean distance is used to see what point "looks similar" to the target in order to choose the correct path, but i dont know how exatcly it works. if you need more explanation i will respond as quickly as i can, i really need this help!!!

p.s. robot is in 2 dimensional space
p.s.2 an answer will be like "ABEF" like that

p.s. 3 for example the array of position a, a = [3 5 9 8 2] means that in the first measurement which could be e.g. north, the value "3" means there is an obstacle near... the third value "9" could be e.g. "SOUTHEAST" and means there is not obstacle near...
Logged
SkyeFire
Global Moderator
*****
Offline Offline

Posts: 1627


« Reply #2 on: February 19, 2010, 08:11:16 PM »

Let me see if I understand this.

You have a list of positions a-f.  Each of these positions is a two-dimensional (X, Y) location.  And each position has an array of range values [q,r,s,t,u,v] where the value of each variable in the array is the distance to the nearest obstacle in a certain direction, with q=North distance, r=North-East distance, etc around the compass until v=North-West.

There are any number of ways to do this, but the simplest approach that I can think of is to treat the entire movement space as a 2D grid.  So,
1:  create a 2D array FLOOR.  Each (FLOOR[X,Y]) entry in the FLOOR array will contain data on whether that coordinate is obstructed or free.
2:  create a 2D array of structure type variables ROBOT_ MAP.  Each entry (ROBOT_MAP[X,Y]) will contain the following sub-elements:  North-Distance, NorthEast-Distance, etc.

Assuming North is parallel with X+ and West is parallel with Y+, FLOOR[X,Y] will be set by using ROBOT_MAP[X,Y] to determine where obstacles are in FLOOR[]:

FOR X = 1 TO (maximum X dimension of motion space)
  FOR Y = 1 to (maximum Y dimension of motion space)
    FLOOR[X+ROBOT_MAP[X,Y].North_Distance,Y] = Obstructed
    FlOOR[X,Y+ROBOT_MAP[X,Y].East_Distance] = Obstructed
    ....and so on
  NEXT Y
NEXT X

That will map your motion space.

Then, draw a line equation between points ROBOT_MAP[1] and ROBOT_MAP[5].  If for brevity we call [1] A and [5] B, then the distance will be equal to SQRT((A.X-B.X)^2 + (A.Y-B.Y)^2).
So the equation for the line drawn between points A and B would be:
Slant = ((A.Y-B.Y)/(A.X-B.X))
The formula for finding any point along that line would be:
Y = (X*Slant) + (A.Y - (Slant*A.X))

So:
FOR X = 1 TO (max X dimension)
  Y = (X*Slant) + (A.Y - (Slant*A.X))
  IF FLOOR[X,Y] = Obstructed THEN
    ...put obstruction handling code here
  ENDIF
NEXT X

This is very basic and bare-bones, of course.  What your code actually *does* when it finds an obstruction along its projected path becomes very complicated, too much so to cover here.

Try looking here, for one thing:  http://coecsl.ece.uiuc.edu/ge423/spring03/Group7/index.html

Logged
Pages: [1] Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!