NAOqi Python API ¶
Some part of the Python SDK are used internally by choregraphe, or generated automatically so please do not use anything that is not documented here, or expect the API to change.
This is the main Python module.
The ALProxy object lets you create a proxy to a module.
Two different constructors are supported, depending whether or not you have a Broker instance available.
ALProxy(name, ip, port)
- name is the name of the module,
- ip is the IP of the broker in which the module is running,
- port is the port of the broker.
As a rule of thumb, you should use this when writing code outside choregraphe.
- name is the name of the module.
ALBroker, ALModule ¶
You should only need this if you want to write NAOqi modules in Python, for instance because you need to subsribe to an event with a callback.
The full process is a bit tricky, and is documented in the Making a Python module - Reacting to events tutorial.
ALBroker(name, ip, port, parent_ip, parent_port)
Create a python broker.
- name name of the broker.
- ip The IP the broker will be listening to.
- port The port the broker will be listening to. If the it equals 0, we will find a free port and use this.
- parent_ip The IP of an other broker to connect to.
- parent_port The port of an other broker to connect to.
This class lets you write NAOqi modules in Python.