Wizard-of-Oz Interface

When running the SIC framework (see https://socialrobotics.atlassian.net/wiki/spaces/CBSR/pages/260276225), it is possible to manually execute instructions through a so-called ‘Wizard-of-Oz interface'. This customisable interface can be accessed by simply navigating to localhost (or 192.168.99.100 if you’re using Docker Toolbox) in your browser when the wizard service is running (suggested command: docker-compose up wizard stream_audio stream_video).

When loading the page initially, it will show all https://socialrobotics.atlassian.net/wiki/spaces/CBSR/pages/1470267449 that are currently connecting to your framework. The first checkbox can be used to check or uncheck all devices. At most one device per type should be selected (e.g. one robot and/or one camera), after which the Connect button should be pressed.

The Wizard-of-Oz interface will now appear, which is horizontally divided into two parts, as can be seen in the screenshot below:

The left half, Control, contains a selection of some basic interaction functionalities. If a camera device is connected and the stream_video service is running (!), the Start feed button can be used to get a live feed. If a microphone device is connected and the stream_audio service is running (!) as well, this feed will automatically include audio too. Always use Stop feed before exiting the page to close this correctly. Toggle idle locks or unlocks the autonomous mode of a Pepper or Nao robot. Eye colour opens a pop-up in which one of the built-in eye LED colours can be selected for a Pepper or Nao robot. Gesture opens a similar pop-up with a selection of all available built-in animations on Pepper or Nao robots. Finally, the textfield can be used to make a robot (or other speaker device) say the text you type. Alternatively, when using a browser device (like Pepper’s tablet), the text can also be shown on that device (note that the webserver service must be running for this to work).

The right half, Favourites, allows customising the interface by uploading a JSON configuration file. The JSON file should be an array of objects, which can either be of the header type, generating a header with a certain text, or of the button type, generating a button with a certain name in order to execute an action with some preset data. Optionally, a button can also have a style attribute (one of: [primary, secondary, success, danger, warning, info, light, dark]) to change its appearance. This is all demonstrated in this example:

[ {"type": "header", "text": "Hello Goodbye"}, {"type": "button", "style": "success", "name": "SayHello", "action": "action_say_animated", "data": "Hello!"}, {"type": "button", "style": "danger", "name": "SayBye", "action": "action_say_animated", "data": "Goodbye!"}, {"type": "button", "name": "Sing", "action": "action_say", "data": "You say yes, I say no, you say stop, and I say go, go, go. You say goodbye, and I say hello."}, {"type": "header", "text": "Other Stuff"}, {"type": "button", "name": "Wave", "action": "action_gesture", "data": "animations/Stand/Gestures/Hey_1"}, {"type": "button", "name": "Rainbow", "action": "action_eyecolour", "data": "rainbow"}, {"type": "button", "style": "warning", "name": "Tablet", "action": "render_html", "data": "<img src=\"https://www.softbankrobotics.com/emea/sites/default/files/images-content/Pepper_8.png\">"} ]

Which generates the following interface:

Make sure that the JSON file is valid (using e.g. http://json.parser.online.fr). For an overview of the available actions and their corresponding data, see https://socialrobotics.atlassian.net/wiki/spaces/CBSR/pages/1266679809.

Note 1: in order to execute multiple actions with one button, it is possible to add the additional parameters action_1 and data_1, action_2 and data_2, etcetera to an existing button definition.

Note 2: there is also a pagination system; by default each element is on page default, but this can be changed by giving the element a different page parameter. You can then switch to such a page of elements by including e.g. "next": "otherpage" in an element.

Note 3: it is possible to include {0} in a data element, which will prompt you for input and replace it appropriately every time when pressing the respective button. It is even possible to add further elements {1}, {2}, etcetera, which you can then replace accordingly by using ; as a separator in the prompt. It is possible to use the same parameter (e.g. {0}) more than once in the data-string.