Tutorial <8>: Moving Pepper
In this tutorial, you will learn the movement of Pepper, focusing on the specifications and control method of Pepper's foot.
Each drive systems, sensor specifications
Movement by orbit
Each drive systems, sensor specifications
Pepper moves around with wheels and it has various sensors around its foot area, which prevent collisions with the surroundings.
Wheels (WheelFR [A], WheelFL [B], WheelB [C])
Bumper (BumperFR [D], BumperFL [E], BumperB [F])
Sonar (SonarF [G], SonarB [H])
Lazor sensor ([I], [J], [K])
Lazor actuator (Shovel [L], Vertical right [M], Vertical left [N], Front [O], Left [P], Right [Q]
There is absolutely no need for developers to know in detail about each of these drivers and sensors. The value of each sensor is processed automatically by the robot, and it is used for safety and more abstract event processing, and the driving system runs appropriately according to the information of the given trajectory.
The easiest way to create the movement is to use the Move To box.
Pepper can be moved by specifying the X, Y, Theta values of MoveTo box parameters.
In this tutorial, we will make Pepper process auditory input "front", "back", "left", "left", "right" and move to the corresponding direction, and rotate with the input "Clockwise" and "Counter clockwise". The application terminates when Pepper hears "End", with Pepper responding back "See you later".
Although you may have already seen it in tutorial (3), Pepper has a safety mechanism that it does not move if there is an obstacle. For confirmation of the movement, we will make Pepper say if the movement has been made successfully using the “Say” box.
Prepare the boxes
Speech > Creation > Speech Reco.
Programming > Logic > Switch case
Movement > Navigation > Move to x6
Speech > Creation > Say x3
For now, arrange boxes as shown in the picture about without connecting them
2. Set parameters
For Speech Reco. box, enter the list of words you want Pepper to recognize; "front", “behind”, “left”, “right”, “clockwise”, “counter clockwise” and “end”. Note that each word must be separated with a semicolon.
For parameters of each Move To box, set
X = 0.2 (20 cm forward),
X = - 0.2 (20 cm backward),
Y = 0.2 (20 cm to the left),
Y = - 0.2 (to the right 20 mm),
Theta = 1.57 (90 ° counter clockwise),
Theta = -1.57 (90 ° clockwise)
3. Set conditional branch
Set the conditions in the Switch Case box. In order from the top to bottom, insert "front", "behind", "left", "right", "clockwise", "counter clockwise" and "end". Make sure that each word is surrounded with double quotation marks.
4. Connect boxes (success)
First, connect boxes without considering the case where Move To box fails.
5. Connect boxes (failure)
Next, connect boxes for when the Move To box fails.
6. Change contents of Say box
Insert "success" (Say), "fail" (Say (1)), "See you later" (Say (2)) to the corresponding Say box.
Now the application is ready to be initiated.
Connect Choregraphe to the virtual robot or your Pepper hardware and run the application.
With the virtual robot, open a dialogue pane and enter "front", "behind" etc. . You should be able to confirm that the robot moves  and say "success" .
With the hardware robot please talk to Pepper and if Pepper moves and say "success", the application is running successfully.
Move by orbit
By using the creation function of planar move provided in Choregraphe, you can intuitively define a free orbit.
Creating movement with Planer move
1. Click the [+] button in the Project files pane and click [Create planar move...].
2. Set an appropriate name for the planar move and click [Add] button.
3. Planar move editor appears on the window.
You can create an orbit by dragging the circle at the centre of the screen. When you click on [New path] button, you can add a new curve (path) and draw an orbit continuously.
4. You can specify the time frame of the orbit sequence with the frame number. (numbers found under Keyframes)
As the frame number increases, the movement becomes slower, and as the frame number decreases, the movement becomes faster.
5. If necessary, relative orientation of Pepper at the end point of the movement can also be specified.
6. The trajectory is edited in the unit of trajectory. By clicking [New Trajectory] button found at the bottom of the editor, you can edit the new path.
If you click  trajectory, you can re-edit the path you have edited so far
Using Planer move
1. You can use the edited planar move by dragging and dropping it on the flow diagram panel.