Week 2

After I began debuggin, work became frustrating but also even more interesting. On Monday Frederick showed me how to use the PlayerStage simulator, which is a program designed to test my code. When i first tried to run my code it exited with an error message I had not gotten before. After starring at the screen for an hour I asked Chris but he did not know what that meant and then asked Frederick. He got really worried that something was wrong with the framework but then found out that the names of two of my objects were the same. He kept on telling me to make sure that they were but did not say that they had to be different between the files.

Then I spent about 20 hours Monday/Tuesday/Wednesday nights trying to find out why when I use the simulator the robot either just turns to an angle and does not move or moves but does not turn afterwards. On Thursday morning I finally asked Frederick to look at my code and tell me why that could be happening and he said that the function calls override each other so the first thing never happens.

By thursday afternoon everything was running but my algorithm did not do what it was supposed to. Then i found out that instead of using Potential Fields I was using Virtual Force Fields. The difference between the two is that VFF makes a map of the terrain and assigns a value to every square on it. Then it uses those values to make a vector that repulses the robot. Potential Field however, does not use a map just the laser readings. It's obstacle vector is inversily proportional to the distance between the robot and the obstacle while its goal vector is directly proportational to the distance between the robot and the goal squared. Since the force is the gradient of the potential I took the gradient of the sum of the two potential functions(vectors) hoping to find a formula in terms of the two constants a and b for the goal potential and the obstacle potential respectively.

Then I spent friday running different combinations of a and b under Open Office to find some kind of a relationship between the two. I determined that the ration of a:b is roughly 15:1. However a little later I saw that instead of plugging in the distance^(3/2) i pluged in distance(1/2).

At four o'clock on Friday we had the usual meeting with Bill Smart that we have everyday. He asked me how things are going and to explain what i am doing and after i explained what i did he asked me why was i doing it so complicated. I pointed him to the book the Frederick suggested I read and then Bill said that I should just approximate the function to something like 1/(x^2) or 1/(x^3) or e^(-x^2/h^2) where x is the distance and h is just a parameter that determines how close the robot is willing to get to the obstacles.

On Monday I will test several functions to see how the robot responds to them and I will also test the functoin with the a and b constants on the simulator to see if i can approximate the constants and which will be easier to work it. I also have a meeting with Bill to discuss the project I will be working on when I finish this.