.. _sdk-index: SDK === .. toctree:: :hidden: Cpp Python .NET Java MatLab Urbi Overview | :ref:`C++` | :ref:`Python ` | :ref:`.Net ` | :ref:`Java ` | :ref:`Matlab ` | :ref:`Urbi ` Before starting --------------- Whatever language you choose, there are common concepts to master and practical information to know. * To understand key concepts, read :ref:`naoqi-framework-overview` section. * For practical tips and tricks to work with NAOs, see :ref:`naoqi-tools` section. Writing code for NAO -------------------- The NAOqi API is currently available in at least 8 languages. Apart from some minor language-specific differences, the API is mostly the same across all languages, allowing you to bring knowledge from one language to another. You can only write NAOqi's module in C++ and Python, but you have access to the full client API in all languages. Only C++ and Python are supported on the robot, other languages are only supported on computer to remotely access NAO. C++ +++ The C++ framework is the most complete framework. It is the only framework that lets you write real-time code, running at high speed on the robot (with loops of less that 10 ms, for instance). You can read more about it in the :ref:`cpp-introduction` section. To be able to easily compile your code, it is recommended that you use CMake with the ``qiBuild`` framework. You can read more about it in the :ref:`qiBuild documentation `, or follow the :ref:`qibuild-guide`. If you really cannot wait, please follow the :ref:`cpp-tutos-using-qibuild` tutorial to get you started with qiBuild. See :ref:`C++ SDK ` .. code-block:: cpp #include int main(int argc, char* argv[]) { AL::ALTextToSpeechProxy tts("", 9559); tts.say("Hello world from c plus plus"); return 0; } Python ++++++ This is the second most complete framework. This framework also lets you run embedded code, but of course you cannot achieve the same performance as with C++. You can also create NAOqi modules in Python, and use the notifications from other modules. You can read more about it in the :ref:`python-introduction` tutorial. Python is also used inside Choregraphe boxes. See :ref:`Python SDK ` .. code-block:: python from naoqi import ALProxy tts = ALProxy("ALTextToSpeech", "", 9559) tts.say("Hello world from python") .NET ++++ All major .NET languages are supported. See :ref:`naoqi-dot-net` for more informations. **C#** .. code-block:: csharp using Aldebaran.Proxies; class Program { static void Main(string[] args) { TextToSpeechProxy tts = new TextToSpeechProxy("", 9559); tts.say("Hello World from c sharp"); } } **Visual Basic** .. code-block:: vbnet Imports Aldebaran.Proxies Module Program Sub Main() Dim tts As TextToSpeechProxy = New TextToSpeechProxy("", 9559) tts.say("Hello World from visual basic") End Sub End Module **F#** .. code-block:: csharp open Aldebaran.Proxies let main () = let tts = new TextToSpeechProxy("10.0.252.218", 9559) tts.say("Hello World from f sharp") main () Java ++++ The NAOqi's java binding is called JNaoQi. See :ref:`java` for more information. .. code-block:: java public class TestTTS { static { System.loadLibrary("JNaoQi"); } public static void main(String[] args) { ALTextToSpeechProxy ttsProxy = new ALTextToSpeechProxy("", 9559); tts.say("Hello World from java"); } } Matlab ++++++ See :ref:`matlab` for more information. .. code-block:: matlab tts = ALTextToSpeechProxy('', 9559); tts.insertData('Hello World from matlab'); Urbi ++++ Executed on a specific robot with an existing NAOqi Urbi context: .. code-block:: python tts.say("Hello World from urbi")