.. _choregraphe-first-steps: Your first steps in Choregraphe ================================ .. _choregraphe-howto-make-nao-do-something: How to make NAO do something ---------------------------- To make NAO do something with Choregraphe: #. Connect NAO to Choregraphe. See :ref:`choregraphe-howto-connect`. #. Create a behavior. See :ref:`choregraphe-howto-create-a-behavior`. #. Play the behavior! See :ref:`choregraphe-howto-play-a-behavior`. If you follow these three steps, NAO should obey you, congratulations! Now you may want to jump to more advanced thing, see :ref:`choregraphe-tutorials`, or have a deeper look, see :ref:`choregraphe-interface`. .. _choregraphe-howto-create-a-behavior: How to create a behavior ------------------------ To create a behavior, you have to drag and drop boxes from a box library to the flow diagram, and connect them so as to make the robot do what you actually want. Here is a short example, if you want to make your robot say "Hello!": #. Select the **Audio > Voice > Say** box from the box library. #. Drag and drop it onto the flow diagram located in the center of Choregraphe. #. Use your mouse to connect the input, located at the upper left of the flow diagram, to the input of the box as illustrated on the diagram below. .. image:: /medias/desktop/beginning_hello.png And this is it, your behavior is finished. .. note:: It is also possible to create your own boxes (see :ref:`How to create boxes `). .. _choregraphe-howto-play-a-behavior: How to play a behavior ---------------------- From the main window of Choregraphe, click on **Connection > Play** or on the following button in the toolbar: .. image:: /medias/desktop/beginning_play_button.png .. note:: Make sure you are connected to a robot, otherwise this icon will be disabled! The behavior of your root diagram is now executed by the NAO you are connected to. .. note:: You can also launch unconnected boxes alone by double-clicking on their 'onStart' input, once the behavior has been played. .. _choregraphe-howto-enslave: How to stiffen NAO ------------------ .. note:: In Choregraphe, set the stiffness or "enslave" is the action to provide power to the motors of your robot. When your NAO is not stiffened, its limbs are soft like a puppet, its motors do not have power. To execute behaviors and see the result on your connected NAO, you have to stiffen it, giving power to the motors. In Choregraphe, an icon gives the current Stiffness state of your robot. There are 3 different icons color: +------------------------------------------------------+----------------------------------------------------------------+ | Icon | Description | +======================================================+================================================================+ | .. image:: /medias/desktop/beginning_enslave.png | NAO is not stiffened. NAO will not move during the behavior. | +------------------------------------------------------+----------------------------------------------------------------+ | .. image:: /medias/desktop/beginning_intermediate.png| Intermediate state. Stiffness of each joint can be customized | | | when executing particular movements. | +------------------------------------------------------+----------------------------------------------------------------+ | .. image:: /medias/desktop/beginning_unenslave.png | NAO is stiffened. It is able to execute any move you are | | | working on. | | | | | | .. warning:: | | | | | | Do not try to move its limbs manually | | | as its motors are geared up. | +------------------------------------------------------+----------------------------------------------------------------+ To stiffen NAO, just click on the icon in the toolbar. The icon should turn red, meaning your robot is stiffened. .. _choregraphe-howto-make-nao-walk: How to make NAO walk -------------------- Walking is very complicated movement that can't be designed by keyframe animation. This is why we have developed other tools that should help you. One of the main modules of the robot is ALMotion. This module has been designed to understand simple orders such as "move this motor to this position in that amount of time", but also walking orders: "head straight for one meter". Well in fact, the orders may be a lot more complex, as you can define all the walking patterns parameters, but we are not going into the specifics now. #. Drag and drop the **Motion > WalkTo** box. #. Click on the adjustable wrench to edit the box parameters. The first two parameters define the target position of the robot, relative to its position and orientation when the box is triggered. X=1 and Y=0 is one meter in front of the robot. X=0 and Y=1 is one meter to the left of the robot. The third parameter is the desired orientation of the robot, still relative to its orientation when the box is triggered. Two checkboxes enable the arm movement during the walk. #. Come back to the root level and connect the behavior entry to your box. #. Click on **Play**. Your robot walks. Go on and test the various parameters for the walk box. For further details on the trajectories you can have look at the "Walking" section of the :ref:`Motion documentation `, in the "Destination Control" sub-section. .. _choregraphe-howto-make-nao-say-something: How to make NAO say something ----------------------------- This section will show you how to make NAO say something different than hello. #. Drag and drop the **Audio > Voice > Say** box onto your diagram. #. Link it to the beginning of the root behavior. Your diagram should look like that: .. image:: /medias/desktop/choregraphe/beginning_hello.png If you start the behavior, NAO will say Hello, here is the way to change what NAO will say: #. Double click on the Say box in order to get into it. Your diagram should look like that: .. image:: /medias/desktop/choregraphe/chore_flow_diagram_inside_say_box.png The Say box has an intern flow diagram gathering two box, the first one is a Localized Text box and the second one is the script box that handles the speaking process. #. Change the text in the Localized Text box to make NAO say what you want. If you want to change NAO language see :ref:`How to change NAO language ` section. .. _choregraphe-howto-change-nao-language: How to change NAO language -------------------------- < **For real NAO only** > < *Not available on virtual robot* > The only way to change NAO language in Choregraphe is to use the **Audio > Voice > Set Speech Lang.** box: #. Drag and drop the **Audio > Voice > Set Speech Lang.** box onto your diagram. #. Link the box to the beginning of the root behavior. Your diagram should look like that: .. image:: /medias/desktop/choregraphe/change_language.png #. Open the parameter menu of the box by clicking on the adjustable wrench. #. Set the language to whatever language you want. .. note:: The chosen language must be installed on the robot. Another way to change the language of the robot is to use the robot web page. .. _choregraphe-howto-change-active-camera: How to change NAO's active camera --------------------------------- < **For real NAO only** > < *Not available on virtual robot* > The only way to switch camera with Choregraphe is to use the **Select Camera** box: #. Drag and drop the **Vision > Select Camera** box onto your diagram. #. Play the behavior by clicking on the play button: .. image:: /medias/desktop/choregraphe/beginning_play_button.png #. Wait until Choregraphe has finished sending the behavior to the robot. #. Double click on one or the other input of the box. You can see in the video monitor that the camera has changed. To display the Video monitor panel, see :ref:`How to display/hide panels ` section. .. _choregraphe-howto-set-volume: How to set NAO's volume ----------------------- < **For real NAO only** > < *Not available on virtual robot* > In Choregraphe, you have different possibilities to set the volume of your robot. #. You can click on the volume button in the menu bar, described in the :ref:`Interface: description and user's guide ` section. This button displays a slider that allows you to set the volume. .. image:: /medias/desktop/choregraphe/volume.png #. You can also use the Set Speaker Volume box.