Skip to content

EmmA WebGUI Documentation

Matthias Hock edited this page Nov 16, 2020 · 1 revision

EmmA WebGUI Documentation

Webpage

The client web page is represented by an agent in the HtmlGuiWsExecutor.

Below you can see the project settings. The webpage can now be addressed through the agent gui.

You can communicate with the webpage by sending action commands to the corresponding agent. This can be done using one of two ways: either directly by using the PlayAction(String) command in a node in the SceneFlow, or by embedding the command in a scene, which is then executed using the PlayScene(String) command.

Setting the client GUI to a specific page

The client GUI can be set to a specific page by sending only a single name, representing an HTML page as named in the project settings (see screenshot below).

For example, the command [gui default] will cause the client GUI to go to the webpage ./default_gui.html, where this path is relative to the folder specified in the guifiles settings (see Webpage).

Sending data to graphs

For the work hours graph, data can be send using the command [gui setWorkHrsGraph day=... type=... value=...].

For the mood graph, data can be send using the command [gui setMoodGraph day=... type=... value=...].

Available options:

  • day is mo or di or mi or do or fr (or sa or so for mood)
  • type is
    • antrieb or emotion or anspannung for mood
    • inside or outside for work hours
  • value is a number (integer for mood or real number for work hours), in string representation (e.g. '5')

Below you can see some examples.

Virtual Character

To use the virtual agent, you need to include the charamelWsExecutor extension.

The sceneflowVar allows you to detect when the character interface has successfully connected. To see this, you have to set a boolean variable in the SceneFlow with default value false, which will then be set to true.

Adding an agent allows you to send commands to it, and also choose a voice for the Text-To-Speech engine.

You can now send commands to the character using either the PlayAction(String) method or via commands embedded in scenes, which are then executed with PlayScene(String).

For example, here the agent gloria will perform the action wave.

Here, the agent gloria will perform the action wave during the specified dialog.