Naoik - Inverse kinematics for the Nao robot

This is an implementation of forward and inverse kinematics for the Nao robot, based on OpenRAVE. In contrast to the IK solver that comes with the Nao, this one is open source and could be used in more flexible ways than the built in solution.

The implementation is packaged as a module for the NaoQI SDK and can run either on the robot, or remotely on a separate computer.


Get NaoQI

Download the NaoQI SDK, for your operating system from the
Aldebaran website. You will need to
login to the website to get the library. The module is tested with NaoQI 1.14.5, Linux 32 and 64 bit.

Extract NaoQI into a folder of your choice, we will here assume that you use ~/.local/lib/naoqi.

Install qibuild

There are several options for compiling modules for NaoQI. We will here describe the default option, using qibuild on a Debian based system. Please see Aldebaran website for other alternatives. Please execute the following commands to install qibuild:

sudo apt-get install cmake build-essential python pip
sudo pip install qibuild

Note! The module may only compile with a recent version of qibuild. We used qibuild 3.2.3 which is the one you currently get from pip.

Setup your work tree

If you have not used qibuild before, set up some general settings by doing:

qibuild config --wizard

We suggest that you choose Unix Makefiles with no IDE. Please refer to the qibuild documentation at Aldebaran website for other alternatives.

Now create a qibuild work tree, which is the root folder for qibuild projects. You may of course have several work trees, but any qibuild project needs to be stored as a subfolder within a work tree. We here assume that use use ~/NaoModules as your work tree:

mkdir ~/NaoModules
cd ~/NaoModules
qibuild init
qitoolchain create --default naoqi ~/.lib/naoqi/toolchain.xml

Download and compile Naoik

Assuming that you have mercurial installed and configured, download the Naoik code into a subfolder of your work tree:

hg clone https://bitbucket.org/billingo/naoik ~/NaoModules/naoik

And you are ready to compile:

cd ~/NaoModules/naoik/IKModule
qibuild configure
qibuild make

Running NaoQI and Naoik

In order to use Naoik, you need to start NaoQI and register IKModule in the running NaoQI instance. If you have a Nao robot around, you could use the NaoQI instance running on that, this is what you should do if you want to control the physical robot. If you have a Webots simulation of Nao instead, NaoQI will be running also inside Webots and you could use that. You could however also register the module in a NaoQI instance that is not connected to a robot and that is what we are going to do in this tutorial. So start NaoQI:


Leave the process running and, in another terminal, register the IKModule:

~/NaoModules/naoik/IKModule/build-naoqi/sdk/bin/IKModule localhost

If NaoQI is running on a robot or a different machine, you should of course replace localhost with the ip of the NaoQI host.

Test the module

Finally, we are ready to test the module. With both NaoQI and IKModule running, open a new terminal and run the python test script:

cd ~/NaoModules/naoik/IKModule
python test.py