I making a path following robot, which understands where certain static objects are located on a map.

I’m generated a digital representation of a 2D map. It is 12’ by 7’ area. It is represented in a 2D array which stores the priority level. The higher the priority level the more the robot wants to travel towards that direction.

A further desciption:
I’m trying to digitize a 12 foot by 7 foot map with the UNO. I’m using a 2D array. I was planning on having a boolean array in stored in RAM which is why i want it so small.
The way it works, lets say you want the transition from each matrix element to represent 1 inch. In other words if you go from array[j] to array[i+1][j] then you have just moved one inch north. So the resolution of the map is 1inch per matrix element. Thus, if you need a 12 foot by 7 foot map the minminum amount of memory would be:

Matrix size row: 12 foot x 12inch/foot * 1element / 1 inch = 144 row elements

Matrix size column: 7foot x 12inch/foot * 1element/1inch = 84 col elements

Hence, we need a 144x84 matrix which contains a total of 12096 elements. These elements are a digital representation of the map.

If those elements are bytes then the amount of memory needed is 12KB approx which can only be stored in flash memory, but if they where bits, 0 or 1 then the memory needed is 12096 bits x (1 byte/8 bits) 1512bytes. You can see the dramatic reduce in memory.

The other way to do this is to make the resolution worst, say 2 inch /element.

Right now I’m just trying to generate the 2D array with java code, I’m not writing on the Uno platform yet. I have successfully generated the map.

Map Attached.

My question is:

The map is a 2D in programming terminology but if you think about in term of vector calculus, it’s just a 2D (discrete) scalar field. Where:
f(i,j,P(i,j)) where P(i,j) is the priority of a certain cell (i,j). My question is:

Does anyone know of a program, like matlab perhaps that is capable of taking a 2D matrix, and chracteristing it as 3D function?

The map is a 2D in programming terminology but if you think about in term of vector calculus, it's just a 2D (discrete) scalar field. Where:
f(i,j,P(i,j)) where P(i,j) is the priority of a certain cell (i,j).

If you have a function with 3 variables - i, j, and P(i.j), the function must represent something. It isn't clear to me just what that function represents. Typically, one would say that y = f(x) or w = f(x,y), where y is a function of x or w is a function of y and y. What replaces the ? in

? = f(i, j, P(i,j))

What do the values in the map shown mean? How will you replace those values that are all over the place with 0 or 1 and retain the same meaning?

Since you don't need blazing fast access to the data, and because flash storage has a relatively short lifespan in read/write cycles, why not get the 256KB EEPROM on SparkFun? It's I2C. I know some people who used it successfully in their first embedded project ever and said it was very easy.

What kind of positional feedback does the robot use? Mostly just curious but I think you are going to need some very good positional feedback before you need a map with 1 inch resolution.

I don't think either of those two methods will provide the kind of accuracy needed to follow a map for very long. Your error will build up so fast if that is all you rely on that a map isn't going to be a ton of help I think.

I'm also working on robot map building at the moment but in my case, because of computational constraints (and I'm using a dual Arduino setup!!) , I moved the calculations to an external computer and it looks like this will work well.

About your question:

Does anyone know of a program, like matlab perhaps that is capable of taking a 2D matrix, and chracteristing it as 3D function?

I never thought about things this way and it's very interesting, but in my view:

Should you consider to use it on an external computer (read common PC), an array of 12096 elements is not a problem, so I wouldn't use that function. But,

if you plan to use that hypothetical 3D function on the robot on the UNO, you potentially use up less memory but you need to consider the very likely possibility that the UNO will just be bogged down by way too many slow floating point divisions and multiplications once you start manipulating the function to generate something useful...

I would consider decreasing the grid resolution, what is the size of your machine? For many cases a grid (matrix) that is much smaller than the machine itself adds no advantage to the goal.