Skip to content
Maciej Stefańczyk edited this page May 12, 2016 · 2 revisions

Build and install API packages

To compile RApps only rapp-api and rapp-robots-api repositories are needed. On OpenNao VM following script can be used to build APIs:

#!/bin/bash

if [ $# -eq 0 ]
  then
    echo "No arguments supplied"
    BASE_DIR=/home/nao/rapp
  else
    BASE_DIR=$1
fi

echo "Building in $BASE_DIR"

# create source space
mkdir -p $BASE_DIR
cd $BASE_DIR
mkdir -p src/

# clode API sources
cd src
git clone -b wut https://github.com/rapp-project/rapp-api.git
git clone -b cpp https://github.com/rapp-project/rapp-robots-api.git

# build rapp-api
cd $BASE_DIR
mkdir -p build/rapp-api
cd build/rapp-api
cmake $BASE_DIR/src/rapp-api -DCMAKE_INSTALL_PREFIX=$BASE_DIR/install
make
make install

# build rapp-robots-api
cd $BASE_DIR
mkdir -p build/rapp-robots-api
cd build/rapp-robots-api
cmake $BASE_DIR/src/rapp-robots-api -DCMAKE_INSTALL_PREFIX=$BASE_DIR/install -DRapp_DIR=$BASE_DIR/install/share/Rapp -DBUILD_ALL=ON
make
make install

Build and install sample RApp

To compile RApp, some environment vars should be set:

export Rapp_DIR=/home/nao/rapp/install/share/Rapp
export RappRobots_DIR=/home/nao/rapp/install/share/RappRobots
export LD_LIBRARY_PATH=/home/nao/rapp/install/lib:$LD_LIBRARY_PATH

Now sample RApps can be built:

cd /home/nao/
git clone https://github.com/maciek-slon/rapp_sample.git
mkdir build
cd build
cmake ../rapp_sample -DCMAKE_INSTALL_PREFIX=/home/nao/rapp_sample/install
make install
Clone this wiki locally