Packages instalation (hydro)

Hydro and common packages installation

If you have not ROS Hydro installed neither workspace initialized follow instructions at http://wiki.ros.org/hydro/Installation/Ubuntu.
The following additional packages are required for Clopema testbed:

sudo apt-get install ros-hydro-desktop-full
sudo apt-get install ros-hydro-moveit-full
sudo apt-get install ros-hydro-robot-state-publisher ros-hydro-cmake-modules
sudo apt-get install python-wstool
sudo apt-get install libglew1.6 libglew1.6-dev libdevil1C2 libdevil-dev gphoto2 libgphoto2-2 libgphoto2-2-dev (*For robot head*)
sudo apt-get install timelimit
sudo apt-get install matlab-support

Clopema packages installation

In you workspace in src folder initialize wstool (wstool init) and add following lines to the .rosinstall file. (http://wiki.ros.org/wstool)

- git: {local-name: clopema_testbed, uri: 'git@clopema.felk.cvut.cz:clopema_testbed.git',
    version: hydro-devel}
- git: {local-name: clopema_tutorials, uri: 'git@clopema.felk.cvut.cz:clopema_tutorials.git',
    version: hydro-devel}
- git: {local-name: clopema_cvut, uri: 'git@clopema.felk.cvut.cz:clopema_cvut.git',
    version: hydro-devel}
- git: {local-name: clopema_perception, uri: 'git@clopema.felk.cvut.cz:clopema_perception.git',
    version: hydro-devel}
- git: {local-name: ros_industrial, uri: 'git@clopema.felk.cvut.cz:ros_industrial.git',
    version: hydro-devel}
- git: {local-name: clopema_motoros, uri: 'git@clopema.felk.cvut.cz:clopema_motoros.git',
    version: hydro-devel}
- git: {local-name: clopema_utilities, uri: 'git@clopema.felk.cvut.cz:clopema_utilities.git',
    version: hydro-devel}
- git: {local-name: openni2_launch, uri: 'https://github.com/CloPeMa/openni2_launch.git',
    version: hydro-devel}
- git: {local-name: clopema_robothead, uri: 'git@clopema.felk.cvut.cz:clopema_robothead.git',
    version: hydro-devel}
- git: {local-name: ar_track_alvar, uri: 'https://github.com/CloPeMa/ar_track_alvar.git',
    version: hydro-devel}
- git: {local-name: clopema_robothead, uri: 'git@clopema.felk.cvut.cz:clopema_robothead.git',
    version: hydro-devel}
- git: {local-name: clopema_certh, uri: 'git@clopema.felk.cvut.cz:clopema_certh.git',
    version: review_prague}
- git: {local-name: clopema_unige, uri: 'git@clopema.felk.cvut.cz:clopema_unige.git',
    version: hydro-devel}

Package, which depend on all (CERTH, CVUT, UG) packages.
- git: {local-name: clopema_all, uri: 'git@clopema.felk.cvut.cz:clopema_all.git', version: hydro-devel}

For UNIGE (Italy) partners only:

- git: {local-name: clopema_testbed, uri: 'git@clopema.felk.cvut.cz:clopema_testbed.git',
    version: hydro-devel-unige}
- git: {local-name: clopema_tutorials, uri: 'git@clopema.felk.cvut.cz:clopema_tutorials.git',
    version: hydro-devel}
- git: {local-name: clopema_cvut, uri: 'git@clopema.felk.cvut.cz:clopema_cvut.git',
    version: hydro-devel}
- git: {local-name: ros_industrial, uri: 'git@clopema.felk.cvut.cz:ros_industrial.git',
    version: hydro-devel}
- git: {local-name: clopema_motoros, uri: 'git@clopema.felk.cvut.cz:clopema_motoros.git',
    version: hydro-devel}
- git: {local-name: clopema_utilities, uri: 'git@clopema.felk.cvut.cz:clopema_utilities.git',
    version: hydro-devel}
- git: {local-name: openni2_launch, uri: 'https://github.com/CloPeMa/openni2_launch.git',
    version: hydro-devel}
- git: {local-name: ar_track_alvar, uri: 'https://github.com/CloPeMa/ar_track_alvar.git',
    version: hydro-devel}
- git: {local-name: clopema_unige, uri: 'git@clopema.felk.cvut.cz:clopema_unige.git',
    version: hydro-devel}

After you type wstool up latest packages version will be downloaded and you can compile it with catkin_make command in parent folder of you workspace.
Becouse of calibration scripts it is important to run compilation twice at the begining, second times with the command catkin_make --force.

Possible problems

If compilation fails because of missing SetPowerOff.h or ClopemaGraspFromTable.h run:

catkin_make --pkg clopema_robot 
catkin_make --pkg clopema_motoros
catkin_make --pkg clopema_moveit
catkin_make

If compilation fails becouse of "No rule to make target `/opt/ros/hydro/lib/libopencv_ts.so'"
Fix the problem by typing code below this text and compile it again.

cd /opt/ros/hydro/lib/ # your path may be different
sudo ln -s libopencv_ts.a libopencv_ts.so

Required environment variables

Several environment variables are required by our scripts to recognize right parameters for your testbed.
You can write the following lines to your ~/.bashrc file to setup required variables in new opened terminals - close and open all terminals after you add this lines to .bashrc.

export CLOPEMA_PARTNER=LOCAL
export ROSLAUNCH_SSH_UNKNOWN=1

Possible CLOPEMA_PARTNER settings:
LOCAL - localhost setting, use if you are not connected to real testbed
CVUT, UG, UNIGE, CERTH, NEO - real testbeds

Test

To test your installation start robot with command:

roslaunch clopema_launch virtual_robot.launch

or if you want to execute commands on real testbed:
roslaunch clopema_launch start_robot.launch

You should see robot in the RVIZ wich can be controlled via interactive markers.