wiki:Bindings

Bindings

A binding provides an XML description of the mapping from a BML behavior to one or more units on the motor plan. While bindings are in principle Engine-dependent, several shared concepts occur in multiple bindings.

Spec

A binding contains different specs, each mapping from a BML behavior with certain properties to one or more motor units.

motor unit definition

Defines the motor unit for the spec. This is Engine dependent. For example:

<FaceUnitSpec type="faceLexeme">
  ... 
  <FaceUnit type="Morph"/>
</FaceUnitSpec>

This hooks up the spec to a motor unit that morphs the face.

type

Each spec has a type, which specifies from which BML behavior type it maps (e.g. gesture, faceFacs, ..).

constraints

Constraints specify which BML behavior parameters should be satisfied to bind this specific spec to a BML behavior

For example:

<FaceUnitSpec type="faceLexeme">
  <constraints>
    <constraint name="lexeme" value="smilemouth"/>
  </constraints>
  ...
<FaceUnitSpec>

binds this spec to the BML behavior

<faceLexeme lexeme="smilemouth" ... />

A namespace attribute can be used in constraint to refer to parameters in an external namespace (that is: not the default bml 1.0  http://www.bml-initiative.org/bml/bml-1.0 namespace).

For example:

<MotionUnitSpec type="gaze">
  <constraints>
    <constraint name="influence" value="EYES"/>	
    <constraint namespace="http://hmi.ewi.utwente.nl/bmlt" name="dynamic" value="true"/>			
  </constraints> 
  ...
</MotionUnitSpec>

binds this spec to the BML behavior

<gaze xmlns:bmlt="http://hmi.ewi.utwente.nl/bmlt" influence="EYES" bmlt:dynamic="true"... />

parametermap

The parametermap maps parameter values from BML to the motor unit. For example:

<parametermap>
  <parameter src="amount" dst="intensity"/>
</parametermap>

sets the value of BML behavior parameter "amount" to motor parameter "intensity".

parameterdefaults

Set default parameter values for a motor unit. Such defaults are overwritten by values set through the parametermap.

Example:

<parameterdefaults>
  <parameterdefault name="intensity" value="1"/>
  <parameterdefault name="targetname" value="KevinHead.mesh-Smile"/>
</parameterdefaults>