Skip to content

Vizzy desktop installation

Plinio Moreno edited this page Jan 23, 2019 · 71 revisions

Install base packages

sudo apt-get install openssh-server openssh-client
sudo apt-get install coinor-libipopt-dev
sudo apt-get install libgtkmm-2.4-dev
sudo apt-get install git

Install ROS

Follow steps from: http://wiki.ros.org/kinetic/Installation/Ubuntu

CFW board kernel driver installation

git clone https://github.com/robotology/cfw002.git
Follow the instructions in README.md

Then you need to add the driver script to the /etc/rc.local:

sudo gedit /etc/rc.local

and add:

<path to cfw repository>/cfw002/load_script/S20_cfw002.sh

Install YARP from sources

Setup environment variables

Create the file /home/vizzy/.bash_env with the following text

export YARP_ROOT=/home/vizzy/repositories/yarp
export YARP_DIR=$YARP_ROOT/build
export YARP_ROBOT_NAME=vizzy
export icub_firmware_shared_DIR=/home/vizzy/repositories/icub-firmware-shared/build
export ICUB_ROOT=/home/vizzy/repositories/icub-main
export ICUB_DIR=$ICUB_ROOT/build
export YARP_DATA_DIRS=$YARP_DIR/share/yarp:$ICUB_DIR/share/iCub
export YARP_COLORED_OUTPUT=1
export YARP_FORWARD_LOG_ENABLE=1
export PATH=$PATH:$ICUB_DIR/bin:$YARP_DIR/bin

Invoke the above file from the /home/vizzy/.bashrc script

source ~/.bash_env

Install dependencies

sudo apt-get install git cmake cmake-curses-gui libeigen3-dev libace-dev libedit-dev

sudo apt-get install qtbase5-dev qtdeclarative5-dev qtmultimedia5-dev \
  qtdeclarative5-qtquick2-plugin qtdeclarative5-window-plugin \
  qtdeclarative5-qtmultimedia-plugin qtdeclarative5-controls-plugin \
  qtdeclarative5-dialogs-plugin libqt5svg5 libgsl0-dev sudo qml-module-qtquick-* qml-module-qtmultimedia

(gsl was missing, check this for xenial: http://www.icub.org/ubuntu/dists/xenial/contrib/science/binary-amd64/Packages)

Clone and compile

In the folder /home/vizzy/repositories

git clone https://github.com/robotology/yarp.git
cd yarp
mkdir build
cd build
ccmake ../

Hit c, then e (if needed), and change the following flags (setting all of them to ON):

CREATE_DEVICE_LIBRARY_MODULES
CREATE_GUIS
CREATE_LIB_MATH
CREATE_OPTIONAL_CARRIERS
ENABLE_YARPRUN_LOG

Hit c again and set the following flags to ON:

ENABLE_yarpcar_bayer_carrier <-- NÃO ESTAVA LÁ. SÓ O yarpcar_bayer É QUE ESTAVA!
ENABLE_yarpcar_mjpeg
ENABLE_yarpcar_rossrv_carrier  <-- O MESMO QUE ACIMA
ENABLE_yarpcar_tcpros_carrier  <-- O MESMO QUE ACIMA
ENABLE_yarpcar_xmlrpc_carrier  <-- O MESMO QUE ACIMA
ENABLE_yarpmod_serial

Hit c twice in a row, then g and issue

make -j$(nproc)

where $(nproc) is automatically converted to the number of CPU cores/threads available.

In the folder /home/vizzy/repositories do

git clone https://github.com/robotology/icub-firmware-shared.git
cd icub-firmware-shared
mkdir build-vizzy-desktop && cd build-vizzy-desktop
ccmake ../

Hit c twice in a row, then g and issue

make

git clone https://github.com/robotology/icub-main.git
cd icub-main
mkdir build
cd build
ccmake ../

Hit c, then e (if needed), and change the following flags (setting all of them to ON):

ENABLE_icubmod_cartesiancontrollerclient
ENABLE_icubmod_cartesiancontrollerserver
ENABLE_icubmod_debugInterfaceClient (ESTE NÃO ESTÁ LÁ!)
ENABLE_icubmod_gazecontrollerclient
ENABLE_icubmod_cfw2can
ENABLE_icubmod_parametricCalib
ENABLE_icubmod_sharedcan
ENABLE_icubmod_canmotioncontrol
ICUB_USE_icub_firmware_shared
ICUB_USE_IPOPT

Hit c, then you have to provide the location of the cfw-002 API directory with the value

/lib/modules/4.10.0-37-generic/iCubDrivers/cfw002/LinuxDriver/API

Then modify the file ~/icub-main/src/libraries/icubmod/cfw2Can/Cfw2Can.h and ~/icub-main/src/libraries/icubmod/cfw2Can/Cfw2Can.cpp, changing the include line

#include "libcfw002.h"

to the following:

#include "/lib/modules/4.10.0-37-generic/iCubDrivers/cfw002/LinuxDriver/API/libcfw002.h"

Then hit c again and g, and issue

make -j$(nproc)

Check installation

yarp-config robot --list

The correct output must list vizzy in the **INSTALLED DATA:

**LOCAL USER DATA:
**SYSADMIN DATA:
**INSTALLED DATA:
* Directory : /home/vizzy/repositories/icub-main/build/share/iCub/robots    <- NADA DISTO APARECE...
default
vizzy

By Pedro Vicente: edit ~/.bash_env so that it becomes like this:

export YARP_ROOT=/home/vizzy/repositories/yarp
export YARP_DIR=$YARP_ROOT/build
export YARP_ROBOT_NAME=vizzy
export icub_firmware_shared_DIR=/home/vizzy/repositories/icub-firmware-shared/build
export ICUB_ROOT=/home/vizzy/repositories/icub-main
export ICUB_DIR=$ICUB_ROOT/build
export VIZZY_YARP_ICUB_ROOT=/home/vizzy/catkin_ws/src/vizzy/vizzy_yarp_icub
export VIZZY_YARP_ICUB_DIR=$VIZZY_YARP_ICUB_ROOT/build
export ICUBcontrib_DIR=/home/vizzy/repositories/icub-contrib-common/build
export YARP_DATA_DIRS=$YARP_DIR/share/yarp:$ICUB_DIR/share/iCub:$ICUBcontrib_DIR/share/ICUBcontrib:$VIZZY_YARP_ICUB_DIR/share/yarp
export YARP_COLORED_OUTPUT=1
export YARP_FORWARD_LOG_ENABLE=1
export PATH=$PATH:$YARP_DIR/bin:$ICUB_DIR/bin:$ICUBcontrib_DIR/bin:$VIZZY_YARP_ICUB_DIR/bin

Don't forget to source:

source ~/.bashrc

In the repositories folder, download the icub-contrib-common repository, compile and install:

cd ~/repositories
git clone https://github.com/robotology/icub-contrib-common.git
cd icub-contrib-common && mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=$(echo $ICUBcontrib_DIR) ..
make install

Download the robots-configuration repository, too. Compile and install:

cd ~/repositories
git clone https://github.com/robotology/robots-configuration.git
mkdir build && cd build
cmake ../
make install

Now, if you issue the command

yarp-config robot --list

you should get

**LOCAL USER DATA:
* Directory : /home/vizzy/.local/share/yarp/robots
**SYSADMIN DATA:
**INSTALLED DATA:
* Directory : /home/vizzy/repositories/icub-contrib-common/build/share/ICUBcontrib/robots
default
vizzy

YARP namespace

Set the namespace with this command:

yarp namespace /vizzy_ns

After that, the command yarp namespace should report:

YARP namespace: /vizzy_ns

and the command yarp where should report:

Looking for name server on 10.10.1.80, port number 10000
If there is a long delay, try:
yarp conf --clean

Compiling vizzy_yarp_icub package

After following the steps on https://github.com/vislab-tecnico-lisboa/vizzy you need to compile Vizzy's yarp code.

Installing the Segway

First install the required package:

sudo apt-get install ros-kinetic-serial

Install http://segwayrmp.github.io/libsegwayrmp/, using the serial library from https://github.com/wjwwood/serial

Download and compile the segway_rmp packate to your catkin_ws/src

git clone https://github.com/segwayrmp/segway_rmp.git
catkin_make

Add vizzy user to the dialout group (for laser and segway)

sudo adduser vizzy dialout

Change the persmissions of the USB port of the segway and the lasers

sudo chmod 666 /dev/ttyUSB0
sudo chmod 666 /dev/ttyACM* (0-1)

Install the laser packages

sudo apt-get install ros-kinetic-urg-node

Commit 7752af0 now runs the urg-node ROS package

Git account and alias configuration

Global user configuration

git config --global user.email [email protected]
git config --global user.name "VisLab Tecnico Lisboa"

Aliases for commits, are defined in the file ~/.bash_aliases

git-commit-as-<github username>='git commit --author="Name surname <email-github-account>"'

IDS cameras

  • Install the camera driver

    tar -xvf uEye-Linux-4.90-64.tgz
    sudo ./ueyesdk-setup-4.90-usb-amd64.gz.run
    sudo /etc/init.d/ueyeusbdrc start
    
  • Install the ROS interface

    git clone https://github.com/anqixu/ueye_cam.git
    

    Compile the driver

Realsense D435

Follow the instructions in Realsense2 camera installation

Openpose