Install yarp and icub-* repositories at vizzy-desktop

From ISRWiki
Jump to navigation Jump to search

Installation of visualization PC

At the computer you want to run gyarpmanager:

 Create the user vizzy

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 file at the /home/vizzy/.bashrc script

 source ~/.bash_env

Then open a new terminal and create the folder /home/vizzy/repositories

Install YARP from sources

At the folder /home/vizzy/repositories

 git clone https://github.com/robotology/yarp.git
 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
 YARP_COMPILE_BINDINGS

Hit c again and set the following flags to ON:

 CREATE_PYTHON
 ENABLE_yarpcar_bayer_carrier
 ENABLE_yarpcar_rossrv_carrier
 ENABLE_yarpcar_tcpros_carrier
 ENABLE_yarpcar_xmlrpc_carrier
 ENABLE_yarpmod_serial

Hit c twice in a row, then g and issue

 make -jX, where X is the number of cores

Install icub-main from sources

At the folder /home/vizzy/repositories

 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
 ENABLE_icubmod_gazecontrollerclient

Hit c, then g and issue

 make -jX, where X is the number of cores

Passwordless connections for icub-cluster script

First, generate a key as follows. You only need to it once; use default choices:

ssh-keygen -t rsa

Then, copy the key to the vizzy-desktop as follows (as example the PC for visualizing is deepthought):

ssh-copy-id -i /home/vizzy/.ssh/id_rsa.pub vizzy@vizzy-desktop
ssh-copy-id -i /home/vizzy/.ssh/id_rsa.pub vizzy@deepthought

Testing the installation

Correctly installed configuration files

Open a terminal and issue

 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
 default
 vizzy

YARP namespace

Issuing the command:

 yarp namespace

should report

 YARP namespace: /vizzy_ns

and yarp where should reply

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

otherwise issue

 yarp namespace /vizzy_ns
 yarp conf
 gedit /home/vizzy/.config/yarp/_vizzy_ns.conf

and add to that file

 10.1.3.1  10000

Running cluster manager

Run the icub-cluster.py having as parameter the xml file for the PC you are running (e.g. deepthought)

 icub-cluster.py vizzy-cluster-at-deepthought.xml

Running gyarpmanager

Run the graphical application manager

 gyarpmanager --from robots/vizzy/ymanager.ini