SoftBank Robotics documentation What's new in NAOqi 2.5?

Python box

What is a Python box

A Python box is a box which includes a Python script. See Scripting Python boxes to learn the specificities of Python in Choregraphe.

../../../_images/chore_ref_script_box.png

How to create a Python box

To create a Python box:

Step Action
Right click on the Flow diagram wherever you want to create the box.

Choose Create a new box > Python... in the contextual menu.

../../../_images/python_box_creation.png
Define a Name and a Description for your box.
Optional: set the picture to recognize it among other boxes.

Optional: set Parameters, Inputs and Outputs.

For further details about parameters, see: How to add/remove inputs, outputs, parameters in a box.

Click the OK button. The created Python box is displayed on the Flow diagram.

Double click on your box.

The Script editor is opened and displays the python script of the box.

The structure of the script is automatically generated and should look like that:

../../../_images/create_script_box.png