Pepper Tutorial <2>: Box manipulation
In Pepper Tutorial <1>, we made Pepper say "Hello" by connecting boxes using Choregraphe.
In this tutorial, we will explain about the boxes in more detail through the use of some examples on Choregraphe.
Boxes are the building blocks of the application behaviour, and they are the parts that represent various functionalities with different levels of complexity.
Boxes can be found and used from the Box libraries, and users may also define their own original boxes or import from external sources that someone else has created into the Box libraries.
Box description: appears when cursor is on the box
Inputs: connectors for receiving signals to start or stop the box or some other data
Output: connector for sending the data or stop signal
Parameter button: for modifying box settings
Input and Output
There are different types of inputs and outputs.
Types defined by icons
Each input and output has an associated icon displayed with it.
[onStart] The box is on start state when the signal is sent to this input. The behaviour of the start state varies depending on the type of box.
[onStop] The box is on stop state when the signal is sent to this input.
[onEvenet] Input other than Start or Stop. The box state stimulated by the input signal varies depending on the type of box.
[onStopped] When the signal is sent from this output, it indicates that the box has stopped.
[punctual] The signal from this output indicates different things depending on the type of box.
Types defined by colours
Each input and output has an associated colour displayed with it. Colours indicate the kind of data it receives or sends.
[Bang] Simple event. There is no data involvement with these inputs/outputs.
[Number] Number data (float or integer) is received/sent with these inputs/outputs.
[String] String (word) data is received/sent with these inputs/outputs.
[Dynamic] Data with either no value (Bang) or some sort of value. If there is a value, it could be one of Number value, String value, Number array, or String array.
Each box's variables can be checked and modified by clicking the parameter button found at the left bottom corner of the box.
When you click the parameter button, the dialog box that looks something like this comes up:
The modifiable variables differ by boxes. We will explain about the variables in more detail later in the tutorial.
There are four types of boxes which vary by how they are constructed.
Python box: boxes that are written with python.
Flow diagram box: when some boxes and their combinations of connections are compiled to make a new box, it is called a flow diagram box.
Dialog box: boxes that are written with QiChat script which is a script language that defines a conversation with Pepper
Timeline box: boxes that are aligned to represent certain poses or flow based on a single timeline
In this tutorial, we will explain about Flow diagram boxes and Timeline boxes. Python boxes and Dialog boxes will be explained in a different tutorial.
Types of Box libraries
There are several categories in default box libraries.
standard ... box group with basic functionalities
advanced ... box group used for more advanced functionalities
tablet ... special box group used for robots with a tablet (like Pepper)
In this tutorial, we will only be using standard box group to explain what we can do with boxes.
Constructing a flow
We will explain about different kinds of boxes, and ways of connecting boxes through constructing a sample flow. We will also be explaining how to simulate a flow using a virtual robot without connecting to an actual robot hardware.
By connecting multiple boxes in order, processing operation moves from one box to another.
In this tutorial, we will make Pepper move forward and then say "Hello".