Visual Servoing Platform  version 3.4.0
Tutorial: How to create an application that uses ViSP on NAOqi OS

We assume in this tutorial that you have successfully cross-compiled ViSP following Tutorial: Cross-compilation for NAOqi OS from Ubuntu host. The aim of this tutorial is to explain how to create an application that uses ViSP cross-build for NAOqi OS as third-party and how to run this application on Nao, Romeo or Pepper robots.

To illustrate this tutorial, we will consider all the examples that are provided in the tutorial dedicated to images (ie. the one located in visp/tutorial/image folder). If you are not familiar with ViSP read first Tutorial: How to create and build a project that uses ViSP and CMake on Unix or Windows.

This tutorial was tested on an Ubuntu 14.04 LTS host computer with:

  • Cross Toolchain 2.3.1 Linux 64 (ctc-linux32-atom-2.3.1.23) on Romeo robot
  • Cross Toolchain 2.4.3 Linux 64 (ctc-linux64-atom-2.4.3.28) on Pepper robot

Create a workspace for your project

We assume that as described in Tutorial: Cross-compilation for NAOqi OS from Ubuntu host, your workspace dedicated to visp contains the following folders:

$ ls $HOME/soft
visp
visp-build-ctc-linux64-atom-2.4.3.28

Create a new folder to host the project you want to run on NAOqi OS

$ mkdir $HOME/soft/tutorial

Get existing tutorial/image folder from ViSP source code

$ cd $HOME/soft/tutorial
$ svn export https://github.com/lagadic/visp.git/trunk/tutorial/image

Cross-build your project

Create first a build folder associated to your Cross Toolchain like:

$ cd $HOME/soft/tutorial
$ mkdir image-build-ctc-linux64-atom-2.4.3.28

Configure your project setting VISP_DIR and CMAKE_TOOLCHAIN_FILE respectively to ViSP and Cross Toolchain location:

$ cd image-build-ctc-linux64-atom-2.4.3.28
$ cmake ../image -DVISP_DIR=$HOME/soft/visp-build-ctc-linux64-atom-2.4.3.28/install/lib/cmake/visp -DCMAKE_TOOLCHAIN_FILE=$HOME/softbank/ctc-linux64-atom-2.4.3.28/toolchain.cmake

Cross-build your project:

$ make -j4

Install the binaries on NAOqi

First create an archive for the binaries:

$ tar cvzf binary.tar.gz --exclude "*Make*" --exclude "cmake*" *

Then copy the binaries to NAOqi OS:

$ scp binary.tar.gz nao@<your_robot_ip>:

Move the binaries to a more friend location like $HOME/tutorial:

$ ssh nao@<your_robot_ip>
nao~ $ mkdir tutorial
nao~ $ tar xvzf binary.tar.gz --directory tutorial
nao~ $ rm binary.tar.gz

Run the binaries:

nao~ $ cd tutorial
nao~ $ ./tutorial-image-manipulation
nao~ $ ./tutorial-undistort

You are now ready to create your own project for Nao, Romeo or Pepper robots.

Next tutorial

You are now ready to see the Tutorial: How to import a CMake project that uses ViSP in Eclipse IDE.