Update 2013.11.03

DNA - (Description of Neighboring Automata) 
This is a contextul configuration - allowing meaningful defaults, without taking away the ability to TWEAK 

The following is an InMoov head with many neighboring services..  servos, tracking, pid, arduino, etc...
With DNA you can split or merge services, or graft new ones of different types into the structure.

Now I have gotten "merging" dna to work.  Above you can see the "flattened" tree structure of an InMoov head DNA - it's usually in a Tree structure, but this way allows easy viewing.  The names in brackets are the proposed names for the services.  You might notice that there are duplicates here - what this means is there are services which are shared.   In this case headArduino is shared between mouthControl and the 2 Tracking services.  The opencv service is shared between the two tracking services.  This is the way the InMoovHead will default, so if you want it set up this way you don't have to do anything.  If you want it set up differently, then you are given the oportunity to "tweak" it before it starts.

Why would you want to tweak it?  Suppose I want Marty Felman Chameleon eyes ?  Eyes which can go in different directions?  Even though some people think this looks bizarre - and maybe should not be the default setup. But with a single line of script I can split the opencv into two seperate instances ! It means (likely) I have 2 cameras..  I can make the head's opencv scan for movment, and the headTracking opencv track something else. 

The point it allows a lot of variation for a small amount of change. Additinally it allows the uses to see what is going on inside a complex service, just by asking about its DNA.

The code in Python would be like this :

dna = Runtime.buildDNA("head01", "InMoovHead")
print dna

"head01" would be the proposed name of the service.. call it whatever you want
The second parameter, "InMoovHead" would be the Service type you are interested in.


There's a new global data structure in MRL's framework, and its a little like DNA .. in that it is a design of how to build complex services (service which contain services)..  Finally, its starting to work, this is the first example of a InMoovHead service's DNA :)

head01.mouthControl=MouthControl - MouthControl
head01.mouthControl.Jaw=Servo - shared Jaw servo instance
head01.mouthControl.Arduino=Arduino - shared Arduino instance
head01.mouthControl.Mouth=Speech - shared Speech instance
head01.headY=Servo - Head tilt servo
head01.headX=Servo - Head pan servo
head01.headTracking=Tracking - Head tracking system
head01.headTracking.xpid=PID - pan PID
head01.headTracking.ypid=PID - tilt PID
head01.headTracking.arduino=Arduino - shared Arduino instance
head01.headTracking.y=Servo - tilt servo
head01.headTracking.opencv=OpenCV - shared OpenCV instance
head01.headTracking.x=Servo - pan servo
head01.eyeY=Servo - Eyes tilt servo
head01.eyeX=Servo - Eyes pan servo
head01.arduino=Arduino - Arduino controller for this arm
head01.eyesTracking=Tracking - Tracking for the eyes
head01.eyesTracking.xpid=PID - pan PID
head01.eyesTracking.ypid=PID - tilt PID
head01.eyesTracking.arduino=Arduino - shared Arduino instance
head01.eyesTracking.y=Servo - tilt servo
head01.eyesTracking.opencv=OpenCV - shared OpenCV instance
head01.eyesTracking.x=Servo - pan servo
head01.opencv=OpenCV - shared OpenCV instance
head01.jaw=Servo - Jaw servo
 
Each line has 3 entries
 
First entry is an hierarchical internal key for unique identification - like head01.headTracking.xpid
this is like saying "The head-bone is connected to the tracking bone, the tracking bone is connected to the pid bone" :)

The second entry "=PID" tells us what "type" of service it is - in the future we can change this with a simple text command - which could allow many changes, such as I2C to substitue for Arduino or Guanine instead of Adenine :)
 
Last entry is a comment of what it does...
 
To store all this information I needed something which had hierarchy and was crazy quick to access.  So I created a generalized Radix Tree Index.  Access time is very very small.  You can ask for any part of the big structure and get it back very quickly.

You can also "tweak" the DNA to fit your build of InMoov or robot...   Wheeee!  we are genetic engineers ! 
:D  

 
hmmm.. I guess Robot DNA looks like Radix tree instead of double-helix ... ahahah
more to come....

hairygael

10 years 5 months ago

WHOOO OOO, THIS IS IMPRESSIVE!

So now we can have access to each part of the robot in a very easy accessible way. I'm not sure to follow you completely, but you are the genetician on this.