Let's Make Robots!

Behaviour-based design. Subsumption architecture

One ot the most challenging tasks I planned for Hurby project, was to define its behaviour. It should behaves in an intelligent manner, discriminating between different happiness states according with user (my daughters) interaction.

Basically, I wanted that Hurby's happiness will depend on two main causes:

  • My daughters should play with it frequently (once a day or a couple of days)
  • They should play with it at least for a minimum period of time (5 to 10 minutes)

Also, independently of that,  Hurby must react to different kind of events coming from its sensors, for example:

  • Listening and answering to voices or external noises
  • Emitting calm sounds and quiet movements when caressed on its head
  • Laughing when tickled on its tummy
  • Becoming upset when picked and lifted up by its ears
  • Going to sleep in the absence of activity during a period of time 

After studied different behaviour-based robotics architectures, I decided to use a subsumption one. For those who are not familiar with subsumption architectures, internet is a rich place to look for, but this one from its creator can be the best starting point: "A robust layered control system for a mobile robot" by Rodney A. Brooks (September, 1985)  .

What Brooks describes, is a new behaviour-based architecture to let robots operate at difference levels of competence, in a layered architecture, in which some layers can supress or inhibit the function of lower (low-priority) layers. What it calls "subsume the role of lower levels".

The result is a robust and flexible control system in which different goals can be achieved in paralel with independence between layers. This is the classical structure of this kind of architectures:

In the case of Hurby toy, at level 0, there is its most basic behaviour, "happiness". Is the behaviour by default, and will be predominant while higher layers are quiet. The rest of behaviours, will be placed in higher layers, as they are asynchronous and event-driven reactions due to puntual sensor detections.

The Subsumption architecture for Hurby toy, is shown and explained below, and as you can see, different behaviours are translated into eyes, ears and feet movements; and emitting voice or other kind of sounds.

The module which controls these actuators, is what I've called Motor Cortex. 

Level 0 (Happiness): As said before, it is the most basic behaviour. When happy, Hurby will move fast, emit sounds and voices continuosly, trying to catch the attention of my daughters to play with it. As it becomes more and more unhappy, it will change its behaviour: slower movements, calm sounds, and so on.

Level 1 (Listen): Hurby can be moving and emiting sounds according with its happiness (level 0), but if it listens a voice from my daughters or other kind of external noise, it inhibits its default behaviour and starts a listening state in which it stops eye movements, place the ears back to listen better and stay quiet. If the voice or noise is identified or it meets some kind of pattern, it reacts accordingly.

Level 2 (Caress): Hurby can be moving freely or listening (level 0, 1) but if it is caressed on its head by one of my daughters, it will behaves as if it was extremely calm and quiet. Soft movements and calm sounds will be predominant against other behaviours.

Level 3 (tickle): Hurby can be happy or unhappy, listening and/or being caressed, but if it is tickled on its tummy it will start laughing. Well, it will laugh if happy, else it can react as if tickling was an uncomfortable situation.

Level 4 (Sorrow): There is one thing above all, which Hurby cannot tolerate, it is when is lifted up by an ear. Its an uncomfortable situation that increase its anger and sorrow.

Level 5 (Sleep): Hurby, needs sleep a lot of time.So if my daughters stop playing with it for a while (5 mins aprox.) it feels the need for sleep. It will close its eyes and stay quiet. Of course, if they touch it during several seconds, can wake it up.


In separate blogs I talk about the fuzzy inference module which controls Hurby's happiness state.

See you!!


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

I had read the term Subsumption Design but didn't know what it was.  Thanks for explaining it to me so I can understand what it is.

I look forward to your discussion on Fuzzy Inference.  Your project is very interesting and will make your daughters very happy when complete. 



Hi Bill, yes they are very excited. Jajaja!!. Every day asking about when they could start playing with it...

In relation to fuzzy inference, I developed a fuzzy inference controller for a previous robot (POPSTAR) and I plan to use it here. It is very fast because I scaled inputs and outputs to uint values, and hence I simplify calculation processes.

I'll publish all the source code here.

I bet they are jazzed!  Very cool project; I have been watching it with great interest.  I know they will love it.

It is interesting that there are no design pattern books that I have found for the robotics field.  That kind of theoretical book might really pave the way and save a lot of pain for folks just as the "Design Patterns" book by the gang of four has done for me in my career.  It mostly sits on a shelf gathering dust, but when I am in the design mode for a new project, I reread my almost 20 year old copy of the book.  

I look forward to seeing your code although I am pretty sure it will be fairly simple and straight forward code.  The hard part is the design and understanding the problem.