Lab 2: Wizard-of-Oz GUI for Nao
Learning Goals
- Students will develop a Wizard-of-Oz (WoZ) GUI interface. A GUI, or graphical user interface, is a visual interface with elements like buttons, text boxes, and menus that a human can use to control a system. In this lab, the GUI will enable a human experimenter to control Nao in real time during a human-robot interaction.
- Students will expand Nao's expressive capabilities by creating GUI buttons for speech, gestures, LED changes, and other behaviors.
Slides
Here's a link to the slides from today's lab.
Getting Started
Preparing Your Files
Please organize your Lab 2 files the same way as Lab 1 so that your imports work correctly and the teaching team can debug issues more easily.
-
Create your Lab 2 folder with this exact name: Inside
EECS690_HRI_Lab, create a folder named lab_2_nao_woz_gui.
cd EECS690_HRI_Lab
mkdir lab_2_nao_woz_gui
-
Name your main Lab 2 file exactly: The Python file for this lab should be named
nao_woz_gui.py.
touch lab_2_nao_woz_gui/nao_woz_gui.py
This filename matters because the lab instructions and example run command assume this exact name.
-
Design and implement your own interface in that file: You will not be given starter GUI code. Instead, you should create your own Wizard-of-Oz interface and decide how to organize the controls, layout, and interaction flow.
-
Activate your virtual environment before running anything: Each time you start working on this lab,
cd EECS690_HRI_Lab and run source venv/bin/activate. (When you're done, run deactivate).
-
Use this folder structure: To make debugging easier, everyone should organize their files in the same way:
EECS690_HRI_Lab/
├── venv/
├── lab_1_hello_nao/
│ └── nao_introduction.py
└── lab_2_nao_woz_gui/
└── nao_woz_gui.py
Important:
- Your Lab 2 folder should also be directly inside
EECS690_HRI_Lab
-
How to run: With your virtual environment activated and while inside
lab_2_nao_woz_gui, run:
python3 nao_woz_gui.py <NAO-IP-ADDRESS>
Replace <NAO-IP-ADDRESS> with your robot's IP address.
Lab 2 Overview
In this lab, you will design and build your own GUI interface that allows a human to control Nao during a live human-robot interaction. The goal is to simulate Nao's conversational abilities and non-verbal behaviors in a controlled setting while giving you practice making interface design decisions yourself.
The interface will include:
- Pre-scripted utterance buttons for things like greetings, expressions of gratitude, and transitions.
- A text entry box and send button for generating custom speech via Nao's speaker.
- Custom control buttons for Nao's movements, facial displays, LED colors, arm gestures, audio clips, and more.
Here is an example GUI made with tkinter to help you envision the kind of layout you might build:
Designing Your Own Interface
For this lab, we will not be providing you with starter GUI code. Instead, you should research how to build a Python-based interface for Nao and then create your own Wizard-of-Oz system from scratch in nao_woz_gui.py.
You should decide what kind of interface will work best for a Wizard who needs to control Nao quickly and clearly during the interaction. For example, you might research tkinter, PySide6, PyQt6, wxPython, or another lightweight approach that you can run locally. The key requirement is that your design is usable in real time and successfully controls the robot.
As part of this process, you should:
- Research one or more ways to build a Python-based interface that can send commands to Nao.
- Design a layout that helps the Wizard quickly trigger both pre-scripted speech and nonverbal/social behaviors.
- Implement the backend logic needed to connect each control in your interface to the appropriate Nao action.
- Test your design and revise it based on how easy it is to use during the interaction.
Note:
Because you are designing the interface yourselves, you may need to look up documentation or tutorials for the GUI toolkit you choose. Keep your design simple and practical. A clear, reliable interface is much better than an overly complex one.
A useful starting point for comparing GUI libraries is this overview page: Which Python GUI library should you use?
Working in Groups
You will work with a different group for all of the robot programming labs (Labs 1-3). Each individual will turn in their own set of deliverables for their GUI design.
Lab 2 Deliverables & Submission
Your GUI must include:
- A control panel of pre-scripted message buttons that enables the robot to execute all of the main speech actions required for the "Three Good Things" exercise.
- A text input field + submit button for the Wizard to input dynamic (non-prescripted) speech for the robot to say.
- At least 4 robot social reaction buttons where each button allows the robot to express a nonverbal behavior (e.g., nodding) or social reaction (e.g., vocal backchannel, expression of surprise). These can leverage the robot's LED, movement, arms, and/or display.
We ask you to turn in the following:
- A video recording named
LASTNAME_lab2.mp4 of your GUI in action with the robot. This video should have both the Wizard-of-Oz interface and robot in the frame and showcase ONLY the first round of the "Three Good Things" exercise (robot disclosure, human disclosure, and robot response).
- Your updated source code named
nao_woz_gui.py.
- A requirements file named
requirements.txt listing the Python libraries you installed so the teaching team can reproduce your environment when grading.
- A short design explanation named
lab2_design_explanation.txt describing why you chose your GUI library, the advantages and disadvantages you found while using it, and whether you used any generative AI tools during the design or implementation (if so, explain how you used them in this lab).
Example requirements.txt
pillow==12.3.0
qi==3.1.5
When the teaching team receives your requirements.txt, we will recreate your environment by activating our course virtual environment and running pip install -r requirements.txt from within EECS690_HRI_Lab.
You can get the requirements.txt for your virtual environment by running pip freeze > requirements.txt in your terminal with your venv active.
Important:
The teaching team needs to be able to run your GUI when grading. If your submitted code does not include enough information for us to reproduce your software environment, or if we cannot run your GUI because dependencies are missing or unclear, you may receive deductions.
Submit everything to Canvas by Thursday, September 10, 2026 at 11:59pm.
"Three Good Things" Interaction Flow
As we introduced in Lab 1, you will be programming the Nao robot to act as a facilitator of a positive psychology exercise called the "Three Good Things." This exercise is a well-known positive psychology intervention that has been shown to improve overall mental health and well-being. In this exercise, both the robot and the participant will take turns sharing three things that they are grateful for that have happened to them in the past week. Here's how the interaction should flow between the robot and human participant and which parts should be pre-scripted vs. dynamic for the wizard:
- Introduction (pre-scripted): The robot introduces itself and the "Three Good Things" exercise to the human participant. While optional, you can include some back-and-forth here between the human and robot (including options for dynamic input) if you'd like, such as asking for the participants name, asking the participant how they're doing, etc.
- Robot Disclosure #1 (pre-scripted): The robot will start the exercise by sharing one thing that it is grateful for. Then, it will prompt the participant to share one thing they're grateful for.
- Participant Disclosure #1: The human participant shares one thing they are grateful for.
- Robot Response to Participant Disclosure #1 (dynamic): The robot responds in 1 sentence (or so) to what the human participant has shared.
- Robot Disclosure #2 (pre-scripted): The robot shares a second thing it is grateful for.
- Participant Disclosure #2: The human participant shares a second thing they are grateful for.
- Robot Response to Participant Disclosure #2 (dynamic): The robot responds to what the human participant has shared.
- Robot Disclosure #3 (pre-scripted): The robot shares a third thing it is grateful for.
- Participant Disclosure #3: The human participant shares a third thing they are grateful for.
- Robot Response to Participant Disclosure #3 (dynamic): The robot responds to what the human participant has shared.
- Robot Conclusion (pre-scripted): The robot concludes the interaction, thanks the participant for their participation, and says goodbye.
Tips & Resources
- Refer back to your Lab 1 knowledge about Nao's Python API: speech, movement, display, LEDs, etc.
- Research documentation for the GUI toolkit or interface approach you choose.
- Possible Python GUI libraries to consider include
tkinter, PySide6, PyQt6, and wxPython.
- Read Which Python GUI library should you use? as one starting point for comparing options.
- Keep the interface simple and usable for real-time interaction.
- Check the Nao API references from lab 1 for details on how to trigger speech, motion, LEDs, and posture changes.
- If you want to use pre-made animations for your Nao's dynamic responses, you can try using the ALBehaviorManager module.
To get a list of the available animated behaviors, you can use the
getInstalledBehaviors() method. This is not required, but can be helpful for creating more engaging interactions (There's also some very fun animations available!)
Extra Challenge
For an additional challenge, consider adding:
- Optional live video streaming of Nao's camera using the ALVideoDevice module
- Keyboard shortcuts for quick triggering of behaviors
- A simple visual log showing which commands were issued and when
Common Errors & Troubleshooting
Before reaching out to the teaching team for help, please read through this section. Many Lab 2 issues come from the same setup and import problems that appeared in Lab 1.
Nao Connection Errors
If your GUI runs but Nao does not respond, or if you see a connection error when trying to send a command to the robot, first check the following:
- Your computer and Nao are connected properly.
- You are using the correct Nao IP address.
- Nao has fully booted up.
- You can run other python code (like your lab 1 code), and get the robot to respond successfully.
Module Not Found Errors
Even after installing packages, you might still see errors like these:
ModuleNotFoundError: No module named 'PySide6'
ModuleNotFoundError: No module named 'PyQt6'
ModuleNotFoundError: No module named 'qi'
For this lab, the most common causes are:
- your virtual environment is not activated
- the required packages were installed in a different location or environment
- your selected GUI library is not installed in the environment you are actually using to run the program
- your import statements are incorrect or missing in your code
The same debugging process from Lab 1 applies here, so confirm you are running the Python interpreter that has your GUI toolkit installed and that the toolkit is listed in requirements.txt.
Important:
Lab 2 depends on the same environment setup as Lab 1. If you run into import problems, go back to the Module Not Found Errors troubleshooting steps from Lab 1 and apply the same process here.
Instructor AI Usage Acknowledgment: This lab was partially created using Gemini AI to do the following things:
- Assist in creating the code for the example GUI implementation