In order for humanoid robots to be able to perform a specific action, appropriate programs must be created. Each action requires a separate program. So if you want the humanoid robot to shake hands with people, you have to create that motion as a single program first. There are several ways to create these programs. Here we will focus on block and direct programming.
There are hardly any programming skills needed for block programming. Authoring systems such as the software Choregraphe are mostly based on block programming. You select prefabricated elements, which you just need to fill with contents and link with the next building block. No programming skills are necessary for this because the program itself takes care of the transfer of the entered data into a format that can be understood by the robot. That way, you can create a program in a short time with a few mouse clicks. This programming mode is also used by LEGO Mindstorms to teach teenagers programming.
Direct programming is more complex than block programming. With this type of programming you write the code for a program and thus need to have advanced coding skills to design more complex programs.
In the case of Pepper and NAO, the codes are based on the Python programming language. Here's an example of what programming with Choregraphe looks like:
If one wishes to see if the created programs work, Choregraphe for example offers the opportunity to connect with Pepper or NAO and to test this. Although the program also offers a simulated preview on the screen, this is sometimes not exactly accurate and / or freezes with low-performing computers. Only a transfer of the program to the robot and a subsequent debugging finally show whether the robot implements the program as desired.
In the following video you can see how NAO recognizes the face of his counterpart and assesses his age and gender.
As you can see in the figure below, this program has been put together using different blocks. The program starts through a voice command, e.g. "Estimate my age" or "Guess". With the block "Set Language" German was set as the language. If you want to use other languages you can set this with this block. As you can see in the video, NAO asks his counterpart to look at him or at his cameras. The block for the camera is linked to the blocks for gender and age.