Monday, March 30, 2009

A bearing on direction

A bunch of changes over the weekend.

Got the red level parameter working - added command line commands to set and read it. Also patched it into all the commands that require a red level - so you can specify it (and it will save it) or leave it off.

Fixed the C++ arctan routine. There was an error for angle >45 degrees which the unit tests didn't pick up. I had actually implemented the unit tests in the Python version and ported them to C++. But unit tests are only as good as you are to spot the different cases, I guess.

However, above this I primarily got the bearing working over the weekend (displaying this real time is cool) and used this to rotate the plan view. This is the big step forward.

That said, I did come across three problems:
  • Picture was 'faint' when running and required a low red level, resulting more noise that I expected ... what I don't understand is that when I downloaded the picture to the Red Extract Mac application, it seemed fine...
  • Horizontal lines seem to get rotated wrongly - sort of at 45 degrees. Vertical lines get rotated just fine - and point directly 'north'.
  • When pointing at 45 degrees it sometimes makes corners into a single line, effectively straightening out the corner.
The first one is the one I need to work on the most. Two possibilities are it's doing red>blue rather than red>green after first image (for some reason) or the picture download is reset the camera - and hence the auto white balance or automatic gain. I'm not sure auto white balance is such a good thing on a red/white/black coloured image, actually. Of course, it might be something else?

The second item needs looking at. I can probably cope with it if I understand why it's happening - although some of the rotation looked pretty weird. Probably a bug though :-)

The third item can wait until we have more working.

Oh, I also got an overhead light for the maze board as well, to give better, more consistent lighting - at least while I'm getting it up and running.

Next up, once these are fixed are: the robot position measurement/calculation, local wall detect and then onto moving in a straight line...

0 Comments:

Post a Comment

<< Home

Newer›  ‹Older