Tuesday, January 19, 2010

Råttent hyttehjørne

Ulempen med tømmerhytte: Råte!

Sunday, March 9, 2008

It about time I wrote a few words about what I have been doing since my last posting (which was almost a year ago).

My new job is ok, and I have learned a lot about web-programming, but it isn't as interesting as programming games.

So I have started up a little hobby-project to avoid my game-programming skills from becoming too rusty. I don't have a real goal with this game, the process of writing is its own reward. So far I have a basic client-server architecture up and running, and a tool-chain where I can create playfields/levels:
The game (from here on called TheGame) is written in python, using the Ogre 3D graphics library (http://python-ogre.org) for 3D rendering. The tools (for here on called TheTool) uses wxPython (http://www.wxpython.org).

All the gamelogic and network code is written from scratch.

The models have been made by me using Blender (http://www.blender.org). Hence the coder's artish look of the graphics :-).

Lately I have been working to get basic pathfinding to work. The screenshot above shows an NPC pathfinding from the livingroom to the kitchen in a model of my apartment.


About the BeerFinder project:
Alas, no real progress has been made on the BeerFinder project, at least not directly. All my spare-time programming efforts have gone into TheGame. I do, however, plan to use TheGame as a BeerFinder simulator and controller. This will enable me to run simulations of the behavior of the real robot, and quickly test various algorithms and techniques.

Monday, April 16, 2007

The end is nigh...

My vacation is now drawing to an end; I will start working at Bouvet at April 26th, so I have only one week of freedom left :-)

Friday, March 2, 2007

Laser reflector

I've solved the problem of sloping floors by adding a simple reflector to the robot, so that the laser-beam is guided toward the light-sensitive resistors. I used double-sided tape to attach pieces of aluminum foil to a couple of smooth pieces to Lego, which was then angled to create a simple reflector:

The robot now looks like it has a beak:


With this reflector, the robot was able to follow the laser-beam across my livingroom with no human intervention.

Thursday, March 1, 2007

I've now tried the laser-idea, and it works well enough. As usual though, the real world is presenting me with problems. In this case the fact that my living-room floor is sagging in the middle by at least one centimeter:-). Since the light-sensitive resistors are fairy small, this causes them to loose sight of the laser in the middle of the room. For now, the plan is to manually adjust aim the laser as needed.

Friday, February 23, 2007

I've added a map of my apartment, so that I can easily see where the robot thinks it is. The results graphically illustrates just how badly the compass is performing indoors. In the screenshot below, robot's measured path is drawn in red. The robot was actually traveling in a straight line from left to right:
The huge error was caused by a loudspeaker on the next room.

From this and other tests, it has become crystal clear that the compass is useless as it is currently being used.

My current plan is to measure the actual magnetic field at lots of points in a grid-pattern throughout the apartment. These robot can then use these measurements to figure out the correct heading based on the compass-reading and the robot's location.

To do this manually would take a loong time (since I need hundreds of measurements just to cover the most important areas). I therefore plan to have the robot do most of the work: I'll try to get the robot to drive along a laser beam while it records the compass-readings every few centimeters. This will result in very precise and fine-grained data, since the robot can measure the straight-line distance it has traveled to within the nearest centimeter.

Ideally, the whole apartment should be crisscrossed with a fine-grained grid of measurements, but that would take a lot of time to do. As first step, however, I only need to do the measurements along the path that the robot is expected to follow. To make a path between the living-room and the kitchen, for instance, I only need measurements along a handful of lines.

The required hardware:
The laser itself is easy to set up. A cheap keyring laser-pointer mounted on a piece of steel wire, or on some Lego will do nicely. I think I have a laser-pointer laying around somewhere.

The laser-detector on the robot might be more tricky. I'll first try to mount two light-sensitive resistors side by side at the front of the robot, separated by a few millimeters. The resistors will be connected to two of the microcontroller's analog/digital converter inputs. When the robot is on course, the laser-beam will hit between the two resistors, and both resistors will measure the same amount of light. When the robot starts to deviate from its course, the laser-beam will start to hit one of the resistors more than the other. The microcontroller will notice that the measurements of the two resistors are starting to differ, and can steer the front wheels accordingly.

Monday, February 19, 2007

In other news: My girlfriend has bought a 50" Pioneer plasma tv:
Nice girlfriend :-)