Part | Name | Description |
---|---|---|
A | Motion | Allows you to define Motion keyframes. Timeline editor button displays the Timeline Editor. Timeline properties button allows you to set the Timeline properties. Play motion button plays the Motion layer of the Timeline. |
B | Time ruler | Represents the time elapsing when the box is started.
|
C | Behavior layers | Allows you to define Behavior layers to be executed in parallel with Motion Keyframes. Add button allows you to add one or more Behavior layers. |
A Timeline enables you to easily synchronize boxes with movements, movements with each other and/or Boxes with each other.
A Timeline is constituted by:
The whole Timeline is based on a time ruler. The time is represented on the Timeline by numbered Frames. Each Frame corresponds to a position of the robot and/or Flow diagrams to execute.
When a Timeline is started, the Time cursor is placed on the Start frame. Then it is regularly incremented to the next Frame, until it gets to the End frame.
The speed to move from a Frame to another is defined by the Frame rate of the Timeline. For further details, see Timeline properties.
Note
The automatic process regularly moving the Time cursor to the next Frame can be affected (stopped, restarted, moved to another Frame) by the sub-boxes and the script of the box. For example, the Goto And Stop boxes move the cursor to a specific frame and pause the cursor so that it will not move to the next frame.
Part | Name | Represented by ... |
---|---|---|
A | Frames | scale of numbers. |
B | Start frame | a green flag. |
C | End frame | a red flag. |
D | Time cursor | a red line, appearing only when the Timeline is executed. |
When the Time cursor gets to a Frame, simultaneously:
The Start frame is a specific Frames.
When the Timeline is started, the Time cursor is directly placed at this Frame.
Any Frame which is before the Start frame will not be reached.
If you force the Time cursor to move on one of those Frames (with a Goto And Play box for example), this will have the same result as going to the End frame.
The End frame is a specific Frames.
As soon as the Time cursor gets to this Frame:
Any Frame which is after the End frame will not be reached.
If you force the Time cursor to move on one of those Frames (with a Goto And Play box for example), this will have the same result as going to the End frame.
By default, Start frame is set to the Frame 0 and End frame is set just before the last Motion frame defined.
To move Start frame or End frame:
To reset them to the default value:
The Time cursor represents the currently executed Frame in the Timeline.
For a Timeline box, the value of the Time cursor:
For a Flow diagram box, its value is systematically equal to -1.
A Script box has no Time cursor.
You can access to the value of the Time cursor of a Timeline box from its Script with the following command:
timeCursor = ALMemory.getData( self.id )
You can also access to it from the script of a child box with the following command:
timeCursor = ALMemory.getData( self.parentId )
Warning
A Script box has no Time cursor. So if you try to call the first command above in a script box, it will return an error.
The Motion layer is where NAO’s movements are stored in the Timeline.
Each Motion keyframe on the Motion layer corresponds to a position of the robot or a part of its body.
Note
As there are several joints stored in this Motion layer, we can say it is made with several sub-motion layers, each of them corresponding to a joint. They are the sub-layers you can see when opening the Timeline Editor.
A Motion keyframe represents a position of the robot or a part of its body.
It contains the angle values of the stored joints.
When the Time cursor gets to a Motion keyframe, the joint values stored to this frame are applied to the robot.
The Motion layer contains Motion keyframe representing specific positions set by the person who made the movement.
Then an interpolation of joint values is automatically made in order to obtain intermediate positions between two Motion keyframes.
Note
You can choose the type of interpolation between the Motion keyframe in the Timeline Editor.
Motion keyframes can be created and modified directly on the Motion ruler or using the Timeline Editor.
Part | Name | Description |
---|---|---|
A | Motion keyframe | Each Motion keyframe is represented by a dark grey rectangle. |
B | Actuator values | If you keep the mouse on a Motion keyframe, a tooltip appears with the values of stored joints. |
C | Selected Motion keyframe | A Motion keyframe gets orange when it is selected. Drag a selection rectangle to select several Motion keyframes, or Ctrl-Click them. |
D | Selected range of frames | The range of frames is an alternative mode of selecting Motion keyframes. Drag the Frame numbers to create it. |
E | Insertion point | Represented by a blue line, the insertion point allows to create or to paste Motion keyframes. |
To insert a new Motion keyframe with the robot’s current position:
Right-click a frame in the grey Timeline and choose Store joints in keyframe.
Choose the joints you want to store the value of (Whole body, Head, Arms or Legs).
A dark grey rectangle appears, containing all the joint values of the selected part of the robot.
To create several Motion keyframes, using the real robot like a puppet, see: How to use the Animation Mode.
To select:
a Motion keyframe, simply click on it.
The robot will automatically take the position corresponding to this Motion keyframe.
several Motion keyframes, drag and drop in the grey Timeline.
all Motion keyframes, right-click the grey Timeline and choose Selection > Select all.
Note
The option Select from layer is only useful in the Timeline Editor.
To remove the values of some joints from any Motion keyframe:
To move Motion keyframes within the Timeline:
or
Note
If the Keyframe you have pasted is empty, this could mean that there is a conflict with contradictory values for the same joint at this frame.
The values of left and right joints can be swapped using the Mirror option in the contextual menu. Then you can select where to apply the swap (Whole timeline, Selected frames, Selected keys).
For example if the robot moves his right arm during the whole Timeline and you mirror it, then it will move his left arm from now on instead.
to change the gap between Motion keyframes:
Select a range of frames by dragging the Frame numbers.
The selected range of frames is represented by a blue square surrounded by purple triangles.
Drag the right purple triangle to resize the selected chunk of motion layer.
Note that the left purple triangle allows you to move the selected chunk of motion layer.
Note
Since a chunk of motion layer may contain Motion keyframes, they are moved as the selection is moved. They also adapt themselves to the new size of the selection. As the size of the selection grows, the duration between Motion keyframes grows too.
To export an animation to C++ or Python code:
Select one or several Motion keyframes.
Right-click them and select Export motion to clipboard.
Select a language (C++ or Python) and a mode (Bezier or simplified).
Paste it in your code.
The robot will make the same movements when this code is executed.
Behavior layers area allows you to add Behavior layer(s) to the Timeline, which basically represent what NAO is going to do in addition to his movements.
Part | Name | Description |
---|---|---|
A | Add button | Allows you to add one or more Behavior layers |
B | Behavior layer | Click the Activation button to enable or disable a Behavior layer:
Click the name of a Behavior layer, to edit it. Click the Delete button to delete the Behavior layer. |
C | Behavior keyframe | Each Behavior layer can run one or several Behavior keyframes sequentially. |
A Behavior layer is constituted by Behavior keyframes, sequentially organized.
Creating more than one Behavior layer allows to get two Behavior keyframes active at the same time i.e. synchronize two Flow diagrams.
A Behavior keyframe is a Flow diagram which is applied on a range of Frames of the Timeline.
As soon as the Time cursor gets within this range of Frames, the Flow diagram of the Behavior keyframe is loaded.
As soon as the Time cursor gets out of the range of Frames of the Behavior keyframe, its Flow diagram is unloaded.
To insert a new Behavior keyframe in a Behavior layer:
To select:
To move Behavior keyframes within the Behavior layer, simply drag them.
They can also be cut, copied, pasted and deleted through the contextual menu.
The Edit button of a Timeline allows you to set the following Timeline parameters:
Name | Description |
---|---|
Framerate (FPS) | Stands for Frame Per Second.
Sets the execution speed of the Timeline.
|
Size | Size of the Timeline in number of frames. |
Resources Acquisition | Warning The Resources Acquisition setting should not be used anymore as an improved solution has been provided which enables you to set the resources used by each box and some more settings. We recommend you to update your older behaviors and set the resources of the boxes of your behaviors. To do so, see the section How to set resources in a box. Allows you to manage conflicts between commands sent to the same joint. You can choose several modes:
|