C++ SDK Installation


Supported Operating Systems

OS Version Allows you to compile code running on ...
Linux Ubuntu 10.04 LTS (Lucid) to 12.04 LTS (Precise)
  • the robot and
  • your computer.
Windows

Microsoft Windows XP Service Pack 3,

Microsoft Windows 7

  • your computer only.
Mac

Mac OS X 10.7.1 Lion

Mac OS X 10.8.3 Mountain Lion

  • your computer only.
Linux only C++ cross-compiler.
The C++ cross-compiler (used to compile code to be run on the robot) is available only on Linux.

Winwows architecture: make sure to compile for 32-bit.
While both architectures (32-bit and 64-bit) are supported to run your favorite IDE, it is mandatory to compile exclusively for 32-bit. The resulting code will run as well on 32-bit or 64-bit environment.

Requirements

Compiler and IDE

OS Compiler and IDE
Linux

GCC version 4.4 or higher and

a recent version of QtCreator.

Windows Visual Studio 2008 or Visual Studio 2010.
Mac

XCode, use the version corresponding to your Mac OS X (Snow Leopard or Lion), and

a recent version of QtCreator.

On Mac and Linux you can also use Eclipse if you are used to it.

Cross-platform build system

Additionally to the C++ SDK, you will have to install qiBuild, a tool designed to generate cross-platform projects using CMake.

CMake generates makefiles and workspaces for any operating system, making the project able to be compiled simply on Windows, Mac, Linux and OpenNAO.

The table below lists the prerequisites to qiBuild installation.

Requirement Comments
CMake version 2.8.3 or higher

On Linux:

Use the cmake package provided by your distribution.

On Windows and Mac:

Python 2.7

On Windows:

To use scripts written in Python, you have to put in your PATH: C:\Python27 and c:\Python27\Scripts

Installation

Step Action

Checking SDK prerequisites

Make sure you have installed one of the recommended compilers and IDE.

For further details, see Compiler and IDE.

Retrieving C++ SDK

Retrieve the C++ SDK archive:

  • naoqi-sdk-1.14.x-[OS].tar.gz or
  • naoqi-sdk-1.14.x-win32-[visualStudioversion].zip

You can download the latest release from the Aldebaran Community Website.

Be careful to select the archive corresponding to your Operating System (Windows, Mac or Linux).

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.

For now, we’ll assume it’s extracted in /path/to/naoqi-sdk.

For further information, see Understanding the package content.

Checking qiBuild prerequisites

Make sure you have installed CMake and Python.

For further details, see Cross-platform build system.

Retrieving qiBuild

Retrieve and extract the qiBuild archive: qibuild-x.zip

You can download the latest release from the Aldebaran Community Website.

If you are used to Git, you can also clone the sources from github: https://github.com/aldebaran/qibuild.

Installing qiBuild

On Linux, Mac:

  • Run:

    ./install-qibuild.sh
  • Make sure ~/.local/bin is in your PATH.

On Windows:

  • Run install-qibuild.bat:

    c:\path\to\qibuild> install-qibuild.bat

Configuring qiBuild

Run:

$ qibuild config --wizard

You will be prompted to specify:

  • CMake path (if not automatically found),
  • CMake Generator and
  • the IDE you will use.

For the CMake generator, choose ‘Unix Makefiles’ on Linux and Mac, or ‘Visual Studio 9 2008’ or ‘Visual Studio 10’ on Windows. (Note: do not choose the 64 bits version for Visual Studio)

For the IDE, it is advised to use ‘Visual Studio’ on Windows and QtCreator on Linux and Mac. (XCode is not well supported by qibuild yet) You can download QtCreator here : http://qt.nokia.com/products/developer-tools/

Note that you can still re-run the config wizard anytime you want.

Result: a file is generated in ~/.config/qi/qibuild.xml. It is shared by all the worktrees you will create.

Next step

Understanding the package content

Main content of the naoqi-sdk archive.

Directory Contains ...
bin Aldebaran binaries.
DLLs  
doc

A local copy of this documentation.

Note that the online documentation is updated more frequently:
etc

XML files: the configuration files you may edit to configure the modules.

naoqi/autoload.ini file: allows you to choose which modules you want to load at startup.

include, lib

Headers and the libraries as part of Aldebaran C++ SDK.

Note that lib/naoqi contains the NAOqi modules.

libs  
share Data needed for our programs. You should not change anything there.