In Choregraphe, it is very easy to create simple movements in no time.
Drag and drop the Template > Animation box onto your diagram.
Double-click on the box to enter it.
An empty timeline is displayed.
Select a frame by clicking in the motion section at an index different from 1.
Note
should go to this position in no time and the keyframe would probably be ignored.
Click on one of the robot limbs to display the motion window.
Note
Whenever there is a current frame cursor (the blue line) on the timeline, the motion editing is on.
In the Motion window, you can add some joint values of the selected limb in the current keyframe, moving a limb will automatically add the joint value to the selected keyframe.
Warning
Make sure you are connected to a real NAO.
Head motors have to be un-enslaved, see page about enslave motor
This tutorial will explain how to use a real NAO robot to create a mouvement.
We will see how to define joints values by moving a real NAO robot.
When you change the real NAO position, you can see that the virtual 3D NAO changes position too. Try to raise NAO’s arm for example.
Wouldn’t it be nice to use this feature to create position keyframes on a motion timeline ?
Now, let’s say we want NAO to move its head up in the first keyframe and to keep its arms down:
Click on the first keyframe
Click on the head of the virtual 3D NAO to open the motion window.
Move the real NAO robot head to the position you want.
Click on the two record buttons of the motion window as in the following picture:
The head joints values have been saved in the first keyframe.
Move the real NAO robot arms to put them down.
Click on Enslave all on/off in the motion window.
The robot doesn’t move.
Right-click on the first keyframe and select the Store joints in keyframe option.
Note
This feature allows you to save the joints values of NAO: the joints of the whole body, the head, the arms or the legs.
As we want to save the joints values of the arms, click on Arms.
The joints values of the arms have been saved in the first keyframe.
Left click the motion timeline to change the current edition frame (the blue line).
A second keyframe is displayed on the motion timeline.
Move the real NAO robot arms to the position you want.
Click on Enslave all on/off in the motion window.
The robot doesn’t move.
Right click on the second keyframe and select Store joints in keyframe > Arms.
The joints values of the arms have been saved in the second keyframe.
Thanks to the Store joints in keyframe option, we were able to save the values of 8 joints (4 joints per arm) in a keyframe in only a single click.
Note
When you right-click on a keyframe, the Remove joints from keyframe option allows you to easily remove the joints values that have been saved in a keyframe. You can choose to remove the joints values of the whole body, or only the values of the head, arms, legs or forearms.
Warning
Make sure you are connected to a real NAO
Head motors have to be un-enslaved, see page about enslave motor
Now we are going to see the new recording mode, that allows you to record joints, without having to jump between the robot and the mouse!
Drag and drop the Templates > Animation box onto your diagram.
Double click on it to see the timeline.
Open the timeline editor by clicking on the following button:
Now activate the recording mode using the menu bar (Record > Switch to recording mode), or the toolbar by clicking on the folowing button:
You should see two new columns in the tree on the left panel.
You are now ready to record your first movement.
Let’s create a new dance with arms movements.
In order to select the joints to record, click on the record columm in front of arms, the window should look like that:
Start the record using the menu bar (Record > start) or the toolbar by clicking on the folowing button:
Move the robot arms as you want and stop the recording whenever you want by clicking on the button:
You should obtain a timeline as follows:
Now, let’s move the head accordingly to our nice arms movement.
Uncheck the “record” column of the arms.
Check the “replay” column of the arms.
Check the “record” column of the head.
The window should look like that:
Enslave the arms.
Note
Enslave the arms is done in order to replay the arms movements during the recording of any movement of the head.
Now, let’s change the recording mode:
Open the motion recorder settings using the menu bar (Record > Settings) or by cliking on the folowing button:
Choose the interactive mode using bumpers.
The robot is going to listen to its bumpers. A small panel should explain how it works.
Now, you may want to edit the recording, and customize your movement.
Open the curves mode by clicking on the folowing button in the tool bar:
The animation is now displayed with curves that represents the evolution of joints values for each keyframes.
Before doing any edition, you can use the “simplify” method, that will remove useless keys from selection:
First, select a range of keyframes.
Click on Simplify button and try the default value:
You will see that non relevant points are now transparent: they will be deleted if you accept the simplification.
Click on Close.
You will see that the result is a bit less frightening! At least, all the double keys have been removed, which make the whole movement easier to read/modify.
Now, you are ready to edit the recording using all the timeline tools!
Warning
Make sure you are connected to a real NAO
This tutorial will show you how to create a movement using the animation mode.
Starting from the Init pose of the pose library, we will animate NAO in order to put it in the position of the famous sculpture called The thinker by Rodin.
This movement will include legs, arms and head movements.
First, if you want more information about the animation mode see How to use the animation mode section.
If you feel ready to bring your NAO to life:
Enslave your NAO
To know how to do it, see How to enslave section.
Put your robot into the Init position using the pose library.
Drag and drop the Template > Animation box.
This box will store all the keyframes of the movement.
Double click on the box in order to display the timeline.
To edit the timeline, click on the folowing button:
The following window is displayed:
Now we will select the record mode, click on the following tools button:
Select the Interactive using the chest button mode, this mode will record NAO’s position each time you press the chest button or say Store position.
Click on Ok.
Click on the following button to switch to the recording mode:
In the actuators list click on the intersection of the record column and the All row to activate the record of all actuators.
The actuators list should look like that :
Now you are ready to start the recording of the movement, click on the following button to start the record:
Don’t worry no joints values are recorded until you have pushed the chest button or said Store position to your robot, this is the particularity of the recording mode you have choosen.
Your robot in the Init pose should look like that:
We will decompose the movement into several peaces in order to make it really simple, we will start by the leg:
As you enslaved your robot before, all the joints are rigid, to move legs, you will have to un-enslave it first, hold your NAO by the chest to prevent it to fall down and push the two bumpers to un-enslave legs.
Lower the chest in order to flex legs, your robot should look like that:
Move the right foot forward and turn it a little on the right like in the following picture:
Enslave the legs, press the chest button to record the position.
The next part of the movement will involve the arms and the head of the robot, put the left arm on the left knee.
Un-enslave the head and lower it until it is no longer possible, tilt the chest forward, raise the right hand to the head
Enslave the robot and verify if the position is stable, if it is, record the position if not tilt the chest backward until the position remains stable and store the position.
Your robot should look like that:
The movement is finished congratulation!!!
To stop the record, click on the following stop record button:
You can see that all the keyframe recorded were added to the timeline.
To perform the animation, exit the animation box and link it to the beginning of the root behavior.
Click on the following play button to start the animation.
Note
If you want, you can get the .crg files here: /your intallation directory/doc/sample/choregraphe/tutorial_animation_mode.crg
You can now create outstanding movements very easily.