Pepper Tutorial <3>: Create poses
In this tutorial
We will explain learn how to control Pepper and the specifications of Pepper's joints through creation of various poses with the upper half of Pepper's body.
Each specification of actuator
There are some actuators for creating Pepper's poses.
Head: Neck (2 axis: Pitch, Yaw)
Arms: Shoulders (2 axis: Roll, Pitch), Elbows (2 axis: Yaw, Roll), Arms (Yaw), and Hands (Open, Close fingers)
Lower body: Waist (2 axis: Pitch, Roll), Knees (Pitch)
Pose Library Pane
Pose Library pane is used for managing Pepper's poses.
If the pane is not displayed on your Choregraphe, go to [View] menu and click [Pose library].
List of poses: Open context menu (Delete, Position properties, Create Folder) with right click. With double click, the robot connected with Choregraphe makes a corresponding pose.
Open position library
Export current position Library
Add a pose: Add the current pose displayed on the robot view (virtual robot) to Pose Library.
Robot View pane is used for checking the status of the connected robot or virtual robot as well as for handling joint movements. In addition, it also displays auxiliary information such as the position of the face recognised by the robot and the human detection range.
If the Robot view pane is not displayed on your Choregraphe, go to [View] menu and click [Robot view].
On / Off: 3D information
On / Off: object information stored in ALWorldRepresentation.
Update / not update: robot position
Update / not update: motors position
On / Off: showing engagement zone
On / Off: showing perceived people
Listed below can also be done on the Robot view pane.
Move display area: hold left click and drag.
Zoom in / Zoom out: mouse scroll / pinch.
Move perspective: hold right click and drag.
First, let's create "stop" pose. There are two ways to make a pose: work on Choregraphe, or move the Pepper hardware.
Work on Choregraphe
Using Choregraphe, you can manage the virtual robot and robot's joints.
Edit with motion Inspector
Click the virtual robot displayed on the robot view pane to open the motion Inspector pane.
You can move Pepper's joints by moving a slider on the motion inspector pane. A robot has Anti-self-collision mechanism, which it avoids colliding with other body parts of its own automatically. Thus when you move Pepper's joint, it sometimes moves in an unintentional way.
Edit with rotation handle
The ring (Rotation handle) that appears on the robot view when you click on the virtual robot is for controlling the joints.
The width of the ring handle widens to indicate which ring you are on, and you can drag the ring to configure the joints, as shown in the picture below.
Poses can be stored into the pose library and each can be called anytime.
Click the "Add potion" button with your robot making the pose you would like to save.
In the [Create a new position] dialog box, fill out the information of the pose.
You can enter the name of the pose [A], and register the image of the pose. By clicking the [Screenshot] button [C], you can set the contents of the current robot view to the pose image[B].
3. Click “OK”, then the pose is registered.
The pose stored in the library can be applied on the robot by double clicking on it.
It is also possible to edit the existing pose using the [Export Position Library] button and the [Open Position Library] button on the pose library pane.
Create Poses with Pepper
With the Animation Mode, you can also make a pose using Pepper hardware.
To enter the animation mode, click the [animation mode] button on the toolbar while connecting to Pepper.
Head and Neck positions
Pepper's eyes turn orange when setting the animation mode on.
When you touch Pepper's head, a part of the eyes turns green and the stiffness of the neck joint is released. This indicates that you can move Pepper's neck joint to create a pose.
3. The stiffness comes back on by touching Pepper's head again. Pepper's eyes will turn back to orange. The created pose will be reflected on the Robot View pane.
Make sure to turn the Animation mode on and check that Pepper's eyes are orange.
2. When you touch the back of Pepper's hand, the stiffness of the arm joints is released. You can manipulate the arm position while touching the back of the hand.
3. When you release the back of Pepper's hand, the stiffness of arm joints comes back on.
Exit animation mode
To exit the animation mode, click the [animation mode] button again or touch Pepper's head and hold for more than 3 seconds and release.
You can register the pose created with the animation mode to the pose library on Choregraphe and play it whenever you like.
Run a created pose
In this tutorial, we will explain how to run newly created pose as a box on Choregraphe.
As an example, we will create 8 different poses shown in the pictures below and register each of them in the pose library.
The Box for switching multiple poses
By dragging and dropping a pose from the Pose library into the flow diagram, you can easily place a "transition to pose" box.
Select a pose from the pose library and drag and drop it onto the flow diagram.
2. Connect the onStart input of the behavior to the onStart input of the created box
When you run this flow, the robot changes the pose from the current pose to pose A. Behaviour accompanying change from pose to pose is automatically interpolated.
In addition, when interpolating between different poses, if colliding movement (e.g. arm passing near the tablet) is required, Anti-self-collision mechanism detects it automatically and Pepper may move in an intentionally way.
By arranging the poses in a line, it allows Pepper to change poses one after the other in a corresponding order.
To make multiple poses appear as a one continuous motion, it is necessary to control time series of particular poses using Timeline box.
Create timeline box
To newly define a motion as a box from an existing pose, follow the steps below.
Right-click on the flow diagram and select [Timeline …] from the [Create a new box] menu.
2. On the Edit box dialog box that opens, enter the appropriate name and press [OK].
3. A new empty timeline box is created. Double click on this box to open the timeline.
4. Set the first pose A to the 25th frame after the start of motion (default frame rate is 25 frames / sec, so one second after the initiation). First, double-click Pause A and apply the pose on the robot.
5. Right click on the 25th frame of the timeline and select [Whole body] of [Store joints in key frame].
Then, the 25th frame becomes the motion key frame and it is displayed in gray. By doing this, each part of the joint will be adjusted so that Pepper makes pose A in the 25th frame.
6. Let's check the movements created so far. To easily monitor the changes in the motions, double click StandInit pose provided by default.
7. Click the play[A] button
In about a second, you can see how the pose of the robot shifts from StandInit position to pose A. To stop the motion, click the stop button [B].
8. Using the procedures followed so far, let's create a motion key frame after pose B.
For example, try to set each pose at following timings shown below.
9. Set the end frame
Right-click on the frame you wish to end this motion and select [Set end frame here].
With these procedures, you can create a new timeline box and create motion for each frame. Like the motions in the standard box library, you can execute the created box in parallel with other boxes or combine various functions.
In this way, you can create a behavior with various gestures by defining the pose of Pepper and calling them from the box at the required timing.
Pepper has various mechanisms to protect itself and other objects such as Anti-self-collision mechanism and various sensors, and when creating motion, it is necessary to pay attention to such mechanisms in order to avoid unintended behaviours.