C++ SDK Installation

What is the C++ SDK for?

  • Develop with your favorite IDE: Visual Studio, QtCreator, Eclipse or XCode
  • Use the NAOqi framework on your PC. You can run the NAOqi executable on your platform, and use it with a simulator, or you can use the framewrok to write software which communicates with your robot
  • On Linux, you can cross-compile libraries to embed in NAO

Architecture of the Aldebaran SDK

A few words about the arborescence of the aldebaran-sdk archive.

  • bin: contains Aldebaran’s binaries.
  • preferences: contains the configuration files you may edit to configure the modules. (The xml files). There’s also the ‘autoload.ini’ file, which allows you to choose which modules you want to load at startup.
  • share: contains the data needed for our programs. You should not change anything there.
  • include /lib: contains the headers and the libraries as part of Aldebaran’s C++ SDK. Note that lib/naoqi contains the NAOqi’s modules. (See below for more information)
  • root.cmake, toolchain-pc.cmake: be careful to not change those files if you want to use CMake with our SDK.

Installation

The Aldebaran C++ SDK is an archive named naoqi-sdk.

  • Retrieve the sdk archive. Be careful to select the archive corresponding to your operating system (Windows, Mac or Linux), and when using windows to your version of Visual Studio (to check it, see Help/About Visual Studio).

    For Windows, choose win32-vs2008 if you are using Visual Studio 2008, or win32-vs2010 if you are using Visual Studio 2010

  • Extract it on your machine.

You should now have downloaded and extracted the Aldebaran archive on your desktop. For now, we’ll assume it’s extracted in /path/to/naoqi-sdk.

Requirements

Supported Operating Systems

  • Linux:

    • Ubuntu 10.04 LTS (Lucid) to 11.04 (Natty)

    Note

    Ubuntu Karmic is no longer officially supported.

  • Microsoft Windows:

    • Windows XP Service Pack 3, Windows 7
  • MacOS:

    • OS X 10.6.4 (Snow Leopard), OS X 10.7.1 (Lion)

Compilers

On Linux, gcc > 4.4 is required.

On Windows, you can use Visual Studio 2008 or Visual Studio 2010.

On Mac, you should use Mac OSX Snow Leopard or Lion and the corresponding XCode version

CMake

Our C++ SDK is designed to work with CMake. CMake is a tool used for cross-platform projects. The advantage is that it generates makefiles and workspaces for any operating system, making the project able to be compiled simply on Windows, Mac, Linux etc.

The preferred CMake version for our SDK in CMake 2.8.

  • On Linux, use the cmake package provided by your distribution.
  • On Windows and Mac, simply use the installer from CMake official website

Recent CMake distributions are available from http://www.cmake.org/cmake/resources/software.html

Environment variables

As a general rule, our software needs a few environment variables to work.

  • On windows, the %PATH% needs to be set because naoqi.exe (and the code you will write) may need to find a few DLLs.
  • On linux, we have to find a few dynamic libraries which are not on a standard location. We have to set $LD_LIBRARY_PATH to /path/to/sdk/lib
  • On Mac, we have to find a few dynamic libraries and several third party frameworks. We have to set $DYLD_LIBRARY_PATH and $DYLD_FRAMEWORK_PATH to /path/to/sdk/lib and /path/to/sdk/Frameworks respectively.

NAOqi also needs $PYTHONHOME on linux and mac, for the “embedded python”. (Which allows you to run python code inside NAOqi’s process)

All those environment variables are set in the scripts you’ll find at the root of the SDK. (NAOqi on linux and mac, naoqi.bat and naoqi_d.bat on windows). You should always use those scripts to launch NAOqi. (The naoqi-bin executable is not supposed to be use directly)

On Windows, you should always put your executables in the bin/ directory.