Robot Blog

A blog to keep track of my honours project.

Feb 28

EPIC WIN.

Awesome eye progress. I kept having StackOverflowException, which meant that I had an infinite loop in my code. The entire learning mechanism is just a giant loop with loads of variables so it was impossible to trace where this loop started and ended. I managed to fix this, it turns out the problem was in the FireSchema method where it called FunctionOne(): I changed it to learningMode = 1 and it works now [the error claimed to be elsewhere].

I thought the code was ready for adding the eye schemas in, but it just wasn’t. So, I’ve changed a few methods, and a few methods are BEAUTIFUL now [mostly the functions to do with comparing states have been altered and further methods have been created]. This makes it a lot easier to change stuff.

I kept having the problem where the arm would reset and still think it was touching the mouth: i’ve rooted out the problem now and that’s happy too. I’ve also worked out how to use the Timers properly [turns out they are immediately called on creation, they don’t wait for the duration to begin with]. Good times.

So, the eye will now look at the most interesting object [making that object less interesting] and then reset. The arm can move while the eye is halted, which caused loads of problems too. Oh, and the most interesting object is highlighted with a different colour which is cool.

The eye functionality is limited [and plain incorrect in places, e.g. schemas store the eye angle and not the difference between the eye and target object] but it is PROGRESS and now that my code is beautiful, it will be easier to work on in the following week.

So, it’s an EPIC WIN, and I’m feelin’ awesome: ha-ha! Could be the wine talking.

STUFF TO DO: if objects have SAME interest value, then any of those objects can be stared at, not just picking one randomly out of them; only aware of objects previously in field of vision; schema holds difference between target object and eye; …