User:Moises

From Asibot & HOAP3 & TEO Wiki
Revision as of 01:59, 27 September 2011 by Moises (talk | contribs) (moved OpenRave - Installation Guide to User:Moises over redirect)
Jump to navigation Jump to search

This guide tries to help new OpenRave users installing and running the software.

First of all, for downloading yarpmods repository, just type:

         sudo apt-get install subversion
Error creating thumbnail: Unable to save thumbnail to destination
Error creating thumbnail: Unable to save thumbnail to destination
         svn co https://roboticslab.svn.sourceforge.net/svnroot/roboticslab/yarpmods
Error creating thumbnail: Unable to save thumbnail to destination

Next step is installing basic yarp dependencies:

        sudo apt-get install cmake libace-dev subversion
        svn co https://yarp0.svn.sourceforge.net/svnroot/yarp0/trunk/yarp2
        sudo apt-get install build-essential cmake-curses-gui

Next sentence allows us setting the YARP_DIR environment variable to yarp2/build through ~/.profile (persistent throughout entire session):

echo "export YARP_DIR=$PWD/yarp2/build" >> ~/.profile

Error creating thumbnail: Unable to save thumbnail to destination
        cd yarp2
        mkdir build
        cd build
        cmake ..
        make -j3
Error creating thumbnail: Unable to save thumbnail to destination
        sudo make install
        cd ../..

YARPMODS_DIR environment variable setting to yarpmods/build:

        echo "export YARPMODS_DIR=$PWD/yarpmods/build" >> ~/.profile
Error creating thumbnail: Unable to save thumbnail to destination
        cd yarpmods
        mkdir build
        cd build
        cmake ..
        make -j3	
        cd ../..

Project organization:

The executables in build/bin (empty until module activation). The shared files (models, config files) in build/share. The libraries in build/lib.

Error creating thumbnail: Unable to save thumbnail to destination

Yarp and yarpmods dependencies are now installed. After this, we must activate each module (printbot, RaveBot, CartesianKontroller).

printbot

Type at the terminal:

        cd yarpmods
        cd build
        ccmake ..

This will appear on screen:

         CMAKE_BUILD_TYPE                                                              
         CMAKE_INSTALL_PREFIX             /usr/local                                   
         ENABLE_rlYarpmods_cartesiankon   OFF                                          
         ENABLE_rlYarpmods_printbot       OFF                                          
         ENABLE_rlYarpmods_ravebot        OFF                                          
         ENABLE_rlYarpmods_robotcontrol   OFF                                          
         YARP_AUTO_LINK                   OFF                                          
         YARP_DIR                         /usr/local/lib/YARP-2.3.3                    
         enable_YARPMODS_TESTS            ON
Error creating thumbnail: Unable to save thumbnail to destination

We must select ENABLE_rlYarpmods_printbot, press enter and then press (C), (E), (C), (E), (G) (configure and exit alternatively until the option generate appears).

Error creating thumbnail: Unable to save thumbnail to destination
Error creating thumbnail: Unable to save thumbnail to destination
         make -j3
         sudo make install

We can check test_printbot appears in the yarpmods/build/bin directory:

RaveBot:

Installing basic dependencies:

         sudo apt-get install libqt4-dev qt4-dev-tools libxml2-dev libode-dev libsoqt4-dev libcoin60-dev libboost-all-dev
         sudo apt-get install subversion	
         svn co https://openrave.svn.sourceforge.net/svnroot/openrave/trunk openrave
         sudo cp openrave/src/cppexamples/FindOpenRAVE.cmake /usr/share/cmake-X.X/Modules							(X.X is your cmake version)

Install more dependencies required:

         sudo apt-get install libavformat-dev libswscale-dev zlib-bin bzip2 python-numpy octave3.2-headers libpcrecpp0

Finally compile with:

         cd openrave
         mkdir build
         cd build
         cmake ..
         make -j3
         sudo make install


You should have test_ravebot in your bin directory if everything went correctly.

Error creating thumbnail: Unable to save thumbnail to destination

Now, we must enable RaveBot module as usual with:

         cd yarpmods

cd build ccmake ..

Set ENABLE_rlYarpmods_ravebot ON as seen with printbot module and press (C) (E) (C) (E) (G).

Error creating thumbnail: Unable to save thumbnail to destination
         make -j3
         sudo make install
         cd
         export PATH=$PATH:/openrave/build

CartesianKontroller:

Eigen and KDL libraries must be downloaded

         svn checkout http://svn.mech.kuleuven.be/repos/orocos/trunk/kdl
         cd kdl
         mkdir build

Install libeigen2.dev from Synaptic (System – Administration – Synaptic Package Manager):

Error creating thumbnail: Unable to save thumbnail to destination
         cmake ..
         make -j3
         sudo make install
         cd
         sudo cp kdl/config/FindEigen2.cmake /usr/share/cmake-2.8/Modules
         sudo cp kdl/build/orocos-kdl-config.cmake kdl/config/FindEigen2.cmake /usr/share/cmake-2.8/Modules

Environment variable setting:

         echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib" >> ~/.profile

Compiling and enabling the module:

         cd yarpmods	
         cd build
         ccmake ..
         (C) 
         (E)
         (G)
         make -j3
         sudo make install
         cd

You should have test_cartesiankontroller in your bin directory if everything went correctly.

Error creating thumbnail: Unable to save thumbnail to destination

And finally, just type:

         yarp server 

test_cartesiankontroller tries to connect to a remote_controlboard. If you already have compiled Ravebot, you can launch from another terminal:

         $YARPMODS_DIR/bin/test_ravebot 

And then, from another terminal, launch:

         $YARPMODS_DIR/bin/test_cartesiankontroller 

It opens a YARP RPC port which you can connect to by using, from another terminal:

         yarp rpc /cartesiankontroller/ravebot/rpc:i 

After all these steps you’ll be able to start using Openrave.