Skip to content

Feedbacks

Brice Donval edited this page Jan 7, 2020 · 7 revisions

Table of Contents

General description

Each Animation, (generated at the level of the Intention Planner or at the level of the Behavior Planner), is composed of a serial of Temporizable (sub-animations). For every Temporizables of each Animation, feedbacks are generated in real-time when Temporizable are "Dead", "Started", "Stopped" or "Ended", AND when the Animation is "Dead", "Started", "Stopped" or "Ended". The feedbacks manager manages feedbacks for every sub-animations generated by "Intentions" and "Signals":

  • begin, stop, end, dead of "Intentions" (communicative intentions level, FML), and their sub-animations (one sub-animation for each communicative intention)
  • begin, stop, end, dead of "Signals" (behaviour level, BML), and their sub-animations (one sub-animation for each communicative behaviour)
To do that, it maintains updated four lists of "Animations" (corresponding to Intentions and Signals), and their associated sublists of temporizable/sub-animations:
  • a first list is updated when a new Animation is triggered (i.e. an Intention or a Signal has been received):
  * pending Animations
  • three other lists are updated when a callback is received:
  * dead Animations
  * started Animations
  * stopped Animations

Usage in GretaModular

The Feedbacks module needs two inputs:

  • from a Callback sender, which get the player callbacks (for instance the callbacks from SEMAINE player), and send to the Feedbacks module
the agent_name, fml id, type, time and id of each the callback:
  * ''agent_name'' is the name of agent whom is performing the signals;
  * ''fml_id'' is the id of the FML file sent to the agent to be performed;
  * ''type'' is a value in ''start'', ''dead'', ''stopped'' and ''end'';
  * ''time'' is absolute time (time of GretaModular) in seconds;
  * ''id'' is the unique id of the Animations which was given by the module which have generated this Animation.
  • from an Animation sender, which compute an animation (either an Intention (FML level) or a Signal (BML level)) and send a copy to the Feedbacks module (the animation is also sent to the module able to perform it).
The Feedbacks module needs one output:
  • a feedback performer, which will treat two type of signals:
  * feedbacks from Animations, with ''animId'', ''type'' and ''liste of sub-animations''
  * feedbacks from sub-animations, with ''type'', ''time'', and ''id''.

Intention and Signal Performer

When an animation is received,

  • it is placed in the pendingAnimationsList
  • the list of all its sub-animation is created
  • for each of these sub-animations, the startTime and endTime are get and memorized (note here that these startTime and endTime are relative times. They indicate the startTime and endTime for t=0 the start of the parent animation)
After that, the feedbacksModule is ready to observe the start of the Animation and the related starts and ends of all its sub-animations.

Callback Performer

When a Callback is received,

  • first of all, a feedback is sent on all feedbackPerformers. It transmit, the id of the animation, the time, and its state (dead/started/stop/ended)
Second, if it is a start Callback,
  • the concerned Animation is removed from the pendingAnimationsList and added to startedAnimationsList,
  • the startTime of its list of sub-animations is updated,
  • the list of sub-animations is observed by the "update" function, to detect their start and end depending on the parent animation startTime (the sub-animation list startTime), and on their respective relative startTime and endTime,
if it is a dead Callback,
  • the concerned Animation is removed from pendingAnimationsList and added to deadAnimationsList,
  • the deadTime of its list of sub-animations is updated,
if it is a stopped Callback,
  • the concerned Animation is removed from the startedAnimationsList and added to stoppedAnimationsList,
  • the stoppedTime of its list of sub-animations is updated,
if it is a endeded Callback,
  • the concerned Animation is removed from the startedAnimationsList and added to stoppedAnimationsList,
  • the endTime of its list of sub-animations is updated,

Update of sub-animations

This is a crucial function of the feedbacksModule: it observe the system time and the different sub-animation timing and infer the current state of each sub-animation

The update is performed on each animation list of sub-animations.

  • If the startTime of the list is not already set, it does nothing (it waits)
  • Else, it updates the pendingList and startedList of sub-animations:
  * For the pendingList, it observes the startTime of each animation and compare it to the current relative time (current time minus the startTime of the parent animation), and if needed update the pendingList and the startedList
  * For the startedList, it observes the endTime of each animation and compare it to the current relative time (current time minus the startTime of the parent animation), and if needed update the startList
  * If needed (any new start or end) it sends a feedback to every feedbackPerformers
  • If the all the sub-animations are ended, it removes the animations of the startedAnimationsList.

Getting started with Greta

Greta Architecture

Quick start

Advanced

Functionalities

Core functionality

Auxiliary functionalities

Preview functionality

Nothing to show here

Previous functionality (possibly it still works, but not supported anymore)

Clone this wiki locally