System Architecture Guide

From David Vernon's Wiki
Jump to: navigation, search


This guide provides an overview the DREAM system architecture, as described in Deliverable D3.1.

The DREAM software system comprises three main sub-systems, corresponding to work-packages WP4 (Sensing and Interpretation), WP5 (Child Behaviour Analysis) and WP6 (Robot Behaviour). Initially, these three sub-systems are implemented by three place-holder components, as follows.

  • sensoryInterpretation
  • childBehaviourClassification
  • cognitiveControl

The functionality of each sub-system will be developed incrementally as the project progresses and as new components that implement part of the functionality encapsulated in the place-holder components are developed and integrated into the system.

During integration, white-box testing will be performed on a system-level by removing the driver and stub functions that simulate the output and input of data in the top-level system architecture, i.e. in one of the three components above, allowing that source and sink functionality to be provided instead by the component being integrated.

Place-holder Component Functionality

The functionality of sensoryInterpretation is specified completely by the 25 perception primitives defined in Section 2 of Deliverable D1.3 (Child Behaviour Specification).

The functionality of cognitiveControl is specified partially by the seven action primitives defined in Section 2 of Deliverable D1.2 (Robot Behaviour Specification). It is only a partial specification because the basis for invoking each of these action primitives has not yet been defined (whereas, in the case of sensoryInterpretation, all of the primitives are continually invoked to monitor the status of the robot’s environment).

The functionality of childBehaviourClassification is encapsulated by three primitives, as follows (the primitives are defined below).

  • getChildBehaviour(state)
  • getChildMotivation(degree_of_engagement)
  • getChildPerformance(degree_of_performance)

Primitives and Ports

The parameters of every primitive in the three sub-systems are explosed by two dedicated ports, one for input and one for output, with the arguments encapsulated in a YARP bottle, a simple but flexible way of sending and receiving messages in YARP (for an example, see the protoComponent port used by the respond() method in protoComponentConfiguration.cpp as described in the DREAM wiki).

The general naming convention for the two ports is /<primitive name>:i for input and /<primitive name>:o for output.

The sensoryInterpretation Component

The following are the primitives and associated input and output ports in the sensoryInterpretation component.

Note that not all primitives have input parameters. The components for those that do are stateful, i.e. once the associated argument values are set, they remain persistently in that state until reset by another input.


getArmAngle(left_azimuth, elevation, right_azimuth, elevation)
getBody(body_x, y, z)


getEyeGaze(eye, x, y, z)

getEyes(eyeL_x, y, z, eyeR_x, y, z)

getFaces(<x, y, z>)

getGripLocation(object_x, y, z, grip_x, y, z)

getHands(<x, y, z>)

getHead(head_x, y, z)

getHeadGaze(<plane_x, y, z>, x, y, z)

getHeadGaze(x, y, z)

getObjects(<x, y, z>)

getObjects(centre_x, y, z, radius, <x, y, z>)

getObjectTableDistance(object_x, y, z, vertical_distance)

getSoundDirection(threshold, azimuth, elevation)

identifyFace(x, y, z, face_id)

identifyFaceExpression(x, y, z, expression_id)

identifyObject(x, y, z, object_id)

identifyTrajectory(<x, y, z, t>, trajectory_descriptor)



trackFace(seed_x, y, z, time_interval, projected_x, y, z)

trackHand(seed_x, y, z, time_interval, projected_x, y, z)

trackObject(objectDescriptor, seed_x, y, z, time_interval, projected_x, y, z)

The childBehaviourClassification Component

The following are the primitives and associated input ports in the childBehaviourClassification component.




The cognitiveControl Component

The following are the primitives and associated input ports in the cognitiveControl component.


moveHand(handDescriptor, x, y, z, roll)

moveHead (x, y, z)


moveTorso (x, y, z)


say(text, tone)

Inter-connectivity between the three components

Any component that need to access the information exposed on the ports associated with a primitive has to have equivalent ports of its own so that the ports can be connected but reversing the input/output designation. Thus, for example, one would connect

/sensoryInterpretation/identifyObject:i to /cognitiveController/identifyObject:o


/sensoryInterpretation/identifyObject:o to /cognitiveController/identifyObject:i.

This would allow cognitiveController to send the x, y, and z location of the object to be identified to sensoryInterpretation and then to receive the identification number of that object from sensoryInterpretation (see definition of identifyObject() in Deliverable D1.3).

Regarding the connectivity between the three components, the following principles apply.

  • each sensoryInterpretation output port is connected to the counterpart input port in the

cognitiveController and childBehaviourClassification components;

  • each sensoryInterpretation input port is connected to the counterpart output port in the cognitiveController component (but not the childBehaviourClassification component);
  • each childBehaviourClassification<code> output port is connected to the counterpart input port in the <code>cognitiveController component;
  • each cognitiveController input port is, typically, not connected to any counterpart output port in either the sensoryInterpretation or childBehaviourClassification components since these ports will be typically be used only internally within the components that will constitute the cognitiveController as it is developed.

Child Behaviour Analysis Primitives


This primitive classifies the child's behaviour on the basis of current percepts, producing an integer output representing the child’s state at that moment.


This primitive determines the degree of motivation and engagement on the basis of the temporal sequence of child behaviour states, quantifying the extent the children are motivated to participate in the tasks with the robot and detect in particular when their attention is lost. The degree_of_engagement is a real number.


This primitive determines the degree of performance of the child on the basis of a temporal sequence of child behaviour states, quantifying the performance of the children in the therapeutic sessions. The degree_of_performance is a real number.