Python SDK


What it does

The Python API for Aldebaran robots allows you to:

  • use all of the C++ API from a remote machine, or
  • create Python modules that can run remotely or on the robot.

Using Python is one of the easiest ways to program with Aldebaran robots.

Mastering key concepts

Please make sure to have read the Key concepts section first.

The basic approach is:

  • Import ALProxy
  • Create an ALproxy to the module you want to use
  • Call a method

This can be seen in the following example, which is explored in detail in the tutorial: Using the API - Making NAO speak.

from naoqi import ALProxy
tts = ALProxy("ALTextToSpeech", "<IP of your robot>", 9559)
tts.say("Hello, world!")

Or in Japanese:

# -*- encoding: UTF-8 -*-
from naoqi import ALProxy
tts = ALProxy("ALTextToSpeech", "<IP of your robot>", 9559)
tts.setLanguage("Japanese")
tts.say("こんにちは")

Installation

Please read the Python SDK Install Guide section.

Samples and tutorials

A progressing series of tutorials is available in the Python tutorials section.

See also the Python Examples section.

Reference documentation