25 Jul 2005 marcin   » (Journeyer)

So, it turns out the weekend wasn't productive at all - I was doing some tidying up and came across an old game (F1 Manager - circa 1996) which I propmptly whiled away all of Saturday and most of Sunday with.

That's not to say, though, that I didn't think robotic thoughts. I've come up with a four level behavioural hierarchy for my little robot. It sort of follows from what I've been reading regarding subsumption architecture, but also trying to make it a 'natural' behaviour model. I'm sure this model has been discredited by some people smarter than me in these things, but I haven't consulted the literature so I'm currently happily ignorant. And, having explained it to my wife, it seems plausible.

1. With the highest priority, we have direct device control - eg the ISR that controlls the operation of the rangefinder, the comms ports, etc. These have to be very much short and sweet ISRs. The analog for the real world to this level of the hierarchy is the involuntary muscle control we all do - eg breathing, hearing, etc. (Note that hearing is a basic function, understanding/listening is something totally different).

2. Next we have the 'self-preservation' reflexes - the ones that protect the robot. These are things like collision avoidance and recovery, low battery recovery, etc. The real world equivalents are pretty easy to imagine - I, personally, find it very difficult to walk into a wall on purpose.

4. I put this here (ie before 3) because it just makes sense in an explanation. The lowest priority is the default behaviour(s) of the robot. This may be simply to do nothing, follow the sun, hide in corners, or it could be to just roam. Think of a dog when it's left by itself.

3. Next is the level of task oriented activity - these are the high level tasks that are the reason for the robot being turned on. The sort of activities at this level are things like search and retrieve, map, navigate, etc. This is analogous to a sheep dog getting told to rustle up some sheep.

I think that 1,2 and 4 are fairly easily implemented in code because they can just be linear combinations of simple state machines. Level 1 is device drivers, level 2 is reactive code (ie if dist < threshold, do collision avoidance) and level 4 can be either random or fairly simple. If the robot has a sufficiently interesting level 4 behaviour (eg roam or follow motion) then it will be pretty cool without even having any level 3 actions programmed.

Cheers, Marcin (marcincoles__at__yahoo.com)

Latest blog entries     Older blog entries

X
Share this page