C++ SDK - Installation Guide¶
Warning
Do you really need C++ SDK?
If it’s your first coding experience, starting with Choregraphe and/or Python is a much better option to get started.
Supported Operating Systems¶
OS | Version |
---|---|
Linux | Ubuntu 16.04 Xenial Xerus - 64bits only |
Windows | Microsoft Windows 10 64bits |
Mac | Mac OS X 10.12 Sierra |
Windows limitations
- The C++ cross-compiler (used to compile code to be run on the robot) is not available on Windows.
- Windows 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.
Supported Compiler and IDE¶
Linux |
|
Windows |
|
Mac |
|
Installing qiBuild¶
Note
Why installing qiBuild?
You are going to compile (on your computer) a code to be run under another Operating System (on the robot), so you need to cross-compile.
qiBuild, is 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 NAOqi OS.
Prerequisites¶
The table below lists the prerequisites to qiBuild installation.
Linux |
|
Windows |
|
Mac |
|
Installation¶
Linux
Step | Action |
---|---|
Install It is recommended to install qibuild with the $ pip install qibuild --user
|
|
Add One way to that is to add the following line at the end of your ~/.bashrc file: PATH=$PATH:$HOME/.local/bin
|
Mac
Step | Action |
---|---|
Install It is recommended to install qibuild with the pip install qibuild --user
|
|
Add $HOME/Library/Python/2.7/bin to your $PATH . |
Windows
Step | Action |
---|---|
Install pip install qibuild
|
|
Add C:\Python27 and
c:\Python27\Scripts in your PATH . |
|
If you’d like to have nice colors in your console, you can install the Python readline library: http://pypi.python.org/pypi/pyreadline. |
Configuration¶
Step | Action |
---|---|
Run: $ qibuild config --wizard
You will be prompted to specify:
It is advised to use ‘Unix Makefiles’ on Linux and Mac, and ‘Visual Studio’ on Windows. Note that you can still re-run the config wizard anytime you want. Result: a file is generated in |
Worktree Initialization¶
Step | Action |
---|---|
Create an EMPTY folder which will be your worktree. Let’s call it: /path/to/myWorktree |
|
Open a Command Prompt and go to that folder. | |
Type this command in order to initialize your worktree: $ qibuild init
|
Final check¶
Let’s check that everything is ready by creating and compiling a sample. If you want:
- a quick check, try: C++ SDK - Hello world (auto-generated).
- to understand in detail all the magic, try: C++ SDK - Hello world (step by step).
Installing and configuring NAOqi SDK¶
Step | Action |
---|---|
Retrieving C++ SDK Retrieve the C++ SDK archive:
You can download the latest release from Developer Center website. For further details, see: Downloading & Installing SoftBank Robotics Software. Be careful to select the archive corresponding to your Operating System (Windows, Mac or Linux). |
|
Extract it on your machine. We’ll assume that the extracted folder is called: naoqi-sdk. |
|
Creating your toolchain Type this command in order to create a toolchain using the feed from the C++ SDK: $ qitoolchain create mytoolchain /path/to/naoqi-sdk/toolchain.xml
Where mytoolchain is the name you want to give to this specific toolchain (you could have several). |
|
Go in your worktree: $ cd /path/to/myWorktree
|
|
Creating your configuration Type this command to create a build configuration associated with this toolchain, and make sure this configuration is the default for this worktree: $ qibuild add-config myconfig -t mytoolchain --default
|