Teaching‎ > ‎COMPSYS 406‎ > ‎

Install Player



The instructions below have been tested with Ubuntu 10.10 , player svn, gearbox svn and Stage 3.2.2

Note: These instructions are for Installing Player on your laptop for working with Stage and a Real robot.

To use the Hokuyo laser device on the robot you need gearbox library to be installed first. If you have used Toby’s PPA (https://launchpad.net/~thjc/+archive/ppa) versions libgearbox  : 10.11-1~ppa3, libgearbox-dev : 10.11-1~ppa3 , then there will be a problem as Player 3.0.2 is not compatible with Gearbox  10.11. So  install gearbox from svn and player from svn.

To work with player/stage and a real robot you need to install 3 packages in order

  1. gearbox
  2. player
  3. stage


Installing gearbox


  1. Create a directory under your user home called playerstage
  2. Download gearbox
    • svn co https://gearbox.svn.sf.net/svnroot/gearbox/gearbox/trunk gearbox
    • cd gearbox

    • mkdir build
    • cd build
    • cmake ../
    • make
      • Sample output 
        • robot@ubuntu:~/playerstage/gearbox/build$ make
          [ 20%] Built target flexiport
          [ 22%] Built target porttoport
          [ 24%] Built target serial_example
          [ 26%] Built target tcp_example
          [ 28%] Built target udp_example
          [ 31%] Built target GbxLockFileAcfr
          [ 33%] Built target GbxSerialAcfr
          [ 35%] Built target locktest
          [ 37%] Built target serialechotest
          [ 40%] Built target serialloopbacktest
          [ 55%] Built target GbxUtilAcfr
          [ 57%] Built target mathtest
          [ 60%] Built target tokenisetest
          [ 62%] Built target trivialstatustest
          [ 64%] Built target trivialtracertest
          [ 71%] Built target GbxGarminAcfr
          [ 73%] Built target gbxgarminacfrtest
          [ 80%] Built target GbxNovatelUtilAcfr
          [ 82%] Built target GbxNovatelAcfr
          [ 84%] Built target crc32test
          [ 86%] Built target gbxnovatelacfrtest
          [ 95%] Built target hokuyo_aist
          [ 97%] Built target hokuyo_aist_getid
          [100%] Built target hokuyo_aist_example

    • sudo make install
    • Check if it installed correctly
      • pkg-config --modversion hokuyo_aist
      • Example Output:
        • 2.0.0
    • export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/gearbox
    • export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig





Installing Player


This are steps for Player version 3.1.0-svn installed at /usr/local
  • Download player from svn
    • svn co https://playerstage.svn.sourceforge.net/svnroot/playerstage/code/player/trunk/ playersrc
    • cd playersrc

    • mkdir build
    • cd build
    • cmake ../
      • Sample output ( doing the following step should not report any error and also show hokuyo_aist as an installed driver )
        • -- Player version 3.1.0-svn
          -- Operating system is Linux
          -- Got System Processor i686
          -- Player will be installed to /usr/local
          -- Headers will be installed to /usr/local/include/player-3.1
          -- Libraries will be installed to /usr/local/lib
          -- Large file support is disabled.
          -- ===== Client Libraries =====
          -- SWIG was not found. Please specify Swig executable location
          -- Python bindings for C client library will not be built - could not find Swig
          -- Could NOT find Ruby  (missing:  RUBY_EXECUTABLE RUBY_INCLUDE_DIR RUBY_LIBRARY)
          -- Ruby bindings for C client library will not be built - could not find Ruby
          -- Python bindings for C++ client library will not be built - disabled by user
          -- Could NOT find Ruby  (missing:  RUBY_EXECUTABLE RUBY_INCLUDE_DIR RUBY_LIBRARY)
          -- Ruby bindings for C++ client library will not be built - could not find Ruby
          -- Could NOT find Boost
          -- Boost libraries were not found. Boost::Signals and Boost::Thread support
                                   will not be included in PlayerC++.
          -- ============================
          --
          -- ----- Processing driver make files -----
          -- checking for module 'artoolkitplus>=2.1'
          --   package 'artoolkitplus>=2.1' not found
          -- checking for module 'gstreamer-base-0.10'
          --   package 'gstreamer-base-0.10' not found
          -- checking for module 'libexif'
          --   package 'libexif' not found
          -- checking for module 'libusb'
          --   package 'libusb' not found
          -- checking for module 'libunicap'
          --   package 'libunicap' not found
          -- checking for module 'libstatgrab'
          --   package 'libstatgrab' not found
          -- checking for module 'libgarcia'
          --   package 'libgarcia' not found
          -- checking for module 'libusb-1.0'
          --   package 'libusb-1.0' not found
          -- checking for module 'GbxSmartBatteryAcfr=1.0.0'
          --   package 'GbxSmartBatteryAcfr=1.0.0' not found
          -- checking for module 'GbxSickAcfr=1.0.0'
          --   package 'GbxSickAcfr=1.0.0' not found
          -- checking for module 'howl>=0.9.6'
          --   package 'howl>=0.9.6' not found
          -- checking for module 'libpqxx'
          --   package 'libpqxx' not found
          -- checking for module 'libpqxx'
          --   package 'libpqxx' not found
          -- checking for module 'libnl-1'
          --   package 'libnl-1' not found
          -- ----- Done -----
          --
          -- ===== Drivers =====
          -- The following drivers will be built:
          -- AioToSonar
          -- accel_calib
          -- acts
          -- amcl
          -- amtecpowercube
          -- aodv
          -- bitlogic
          -- blobposition
          -- blobtodio
          -- blobtracker
          -- bumper2laser
          -- bumpersafe
          -- bumpertodio
          -- cameracompress
          -- camerareq
          -- camerauncompress
          -- camerauvc
          -- camerav4l
          -- camerav4l2
          -- camfilter
          -- canonvcc4
          -- clodbuster
          -- cmdsplitter
          -- cmucam2
          -- cmvision
          -- create
          -- cvcam
          -- deadstop
          -- differential
          -- diocmd
          -- diodelay
          -- diolatch
          -- dummy
          -- ekfvloc
          -- epuck
          -- er1
          -- erratic
          -- fakelocalize
          -- festival
          -- flexiport
          -- flockofbirds
          -- garminnmea
          -- gbxgarminacfr
          -- globalize
          -- goto
          -- gridmap
          -- gripcmd
          -- hemisson
          -- hokuyo_aist
          -- imageseq
          -- imgcmp
          -- imgsave
          -- inhibitor
          -- insideM300
          -- iwspy
          -- kartowriter
          -- khepera
          -- laserbar
          -- laserbarcode
          -- lasercspace
          -- lasercutter
          -- laserfeature
          -- laserposeinterpolator
          -- laserptzcloud
          -- laserrescan
          -- lasersafe
          -- lasertoranger
          -- linuxjoystick
          -- linuxwifi
          -- localbb
          -- mapcspace
          -- mapfile
          -- mapscale
          -- mbasedriver
          -- mbicp
          -- mica2
          -- microstrain
          -- motionmind
          -- mricp
          -- nd
          -- nomad
          -- obot
          -- opaquecmd
          -- p2os
          -- passthrough
          -- pbslaser
          -- portio
          -- ptu46
          -- rangerposeinterpolator
          -- rangertodio
          -- rangertolaser
          -- readlog
          -- relay
          -- rflex
          -- roboteq
          -- robotracker
          -- roomba
          -- rs4leuze
          -- rt3xxx
          -- searchpattern
          -- segwayrmp400
          -- serialstream
          -- serio
          -- shapetracker
          -- sickLDMRS
          -- sickRFI341
          -- sicklms200
          -- sicklms400
          -- sicknav200
          -- sicks3000
          -- simpleshape
          -- skyetekM1
          -- snd
          -- sonartoranger
          -- sonyevid30
          -- speechcmd
          -- sphere
          -- sphereptz
          -- stalltodio
          -- suppressor
          -- tcpstream
          -- upcbarcode
          -- vec2map
          -- velcmd
          -- vfh
          -- videocanny
          -- vmapfile
          -- wavefront
          -- wbr914
          -- writelog
          --
          -- The following drivers will not be built:
          -- acr120u - Could not find header usb.h
          -- alsa - Could not find header alsa/asoundlib.h
          -- amtecm5 - Could not find header Device.h
          -- artoolkitplus - Could not find package artoolkitplus
          -- camera1394 - Could not find header libraw1394/raw1394.h
          -- cameragst - Could not find package gstreamer-base-0.10
          -- eedhcontroller - Disabled - probably doesn't build
          -- garcia - Could not find package libgarcia
          -- gbxsickacfr - Could not find package GbxSickAcfr
          -- isense - Could not find header isense/isense.h
          -- laservisualbarcode - Has not been updated to use dynamic message structures
          -- laservisualbw - Has not been updated to use dynamic message structures
          -- nimu - Could not find header usb.h
          -- nxt - Could not find package libusb-1.0
          -- oceanserver - Could not find package GbxSmartBatteryAcfr
          -- phidgetAcc - Could not find libphidget
          -- phidgetAcc - Could not find libphidget
          -- phidgetifk - Could not find libphidget
          -- postgis - Could not find package libpqxx
          -- postlog - Could not find package libpqxx
          -- powershot - Could not find header libptp2/ptp.h
          -- rcore_xbridge - Could not find header libparticle.h
          -- reb - Disabled by default
          -- robotino - Could not find header robotinocom.h
          -- segwayrmp - Disabled by default
          -- service_adv_mdns - Disabled by default
          -- sphinx2 - Disabled by default
          -- sr3000 - Could not find header libusbSR.h
          -- statgrab - Could not find package libstatgrab
          -- stoc - Could not find header SVS/svsclass.h
          -- swissranger - Could not find header libMesaSR.h
          -- unicapimage - Could not find package libunicap
          -- wlanscan - Could not find package libnl-1
          -- xsensmt - Disabled by default - set XSENSMT_SOURCE_DIR
          -- yarpimage - Could not find header yarp/os/all.h
          -- ===================
          --
          -- ===== Examples =====
          -- ====================
          --
          -- ===== Player utilities =====
          -- XMMS plugin will not be built - XMMS not found
          -- ============================
          --
          -- Configuring done
          -- Generating done
          -- Build files have been written to: /home/robot/playerstage/playersrc/build

    • make 
    • sudo make install


Installing Stage3.2.2


  • Download Stage from http://ppa.launchpad.net/thjc/ppa/ubuntu/pool/main/s/stage/stage_3.2.2.orig.tar.gz
  • sudo apt-get install fluid
  • sudo apt-get install glutg3-dev
  • tar xvzf stage_3.2.2.orig.tar.gz
  • cd Stage-3.2.2-Source
  • mkdir build
  • cd build
  • cmake ../
    Sample output
    -- Stage version 3.2.2
    -- Operating system is Linux
    -- Build type RELEASE
    -- Checking for libtool
    -- Checking for required libraries...
    --   * FLTK version 1.1.10 detected via /usr/bin/fltk-config
    -- Checking for optional libraries...
    --   * Player version 3.1.0-svn detected at /usr/local
    -- Installation path CMAKE_INSTALL_PREFIX=/usr/local
    -- Configuring libstage
    -- Looking for WebSim
    -- checking for one of the modules 'websim'
      * WebSim not detected. If WebSim is installed but not detected, check your PKG_CONFIG_PATH.
    -- Configuring libstageplugin
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/robot/playerstage/stagesrc/build
  • make
  • sudo make install





Building examples



  • cd ~
  • mkdir libplayerc++_example
  • cd libplayerc++_example
  • ccmake /usr/local/share/player/examples/libplayerc++/
  • cmake .
  • make
    • Sample output:
      • robot@ubuntu:~/libplayerc++_example$ make
        Scanning dependencies of target camera
        [  8%] Building CXX object CMakeFiles/camera.dir/camera.o
        Linking CXX executable camera
        [  8%] Built target camera
        Scanning dependencies of target clientgraphics
        [ 16%] Building CXX object CMakeFiles/clientgraphics.dir/clientgraphics.o
        Linking CXX executable clientgraphics
        [ 16%] Built target clientgraphics
        Scanning dependencies of target clientgraphics3d
        [ 25%] Building CXX object CMakeFiles/clientgraphics3d.dir/clientgraphics3d.o
        Linking CXX executable clientgraphics3d
        [ 25%] Built target clientgraphics3d
        Scanning dependencies of target example0
        [ 33%] Building CXX object CMakeFiles/example0.dir/example0.o
        Linking CXX executable example0
        [ 33%] Built target example0
        Scanning dependencies of target example4
        [ 41%] Building CXX object CMakeFiles/example4.dir/example4.o
        Linking CXX executable example4
        [ 41%] Built target example4
        Scanning dependencies of target grip
        [ 50%] Building CXX object CMakeFiles/grip.dir/grip.o
        Linking CXX executable grip
        [ 50%] Built target grip
        Scanning dependencies of target laserobstacleavoid
        [ 58%] Building CXX object CMakeFiles/laserobstacleavoid.dir/laserobstacleavoid.o
        Linking CXX executable laserobstacleavoid
        [ 58%] Built target laserobstacleavoid
        Scanning dependencies of target ptz
        [ 66%] Building CXX object CMakeFiles/ptz.dir/ptz.o
        Linking CXX executable ptz
        [ 66%] Built target ptz
        Scanning dependencies of target randomwalk
        [ 75%] Building CXX object CMakeFiles/randomwalk.dir/randomwalk.o
        Linking CXX executable randomwalk
        [ 75%] Built target randomwalk
        Scanning dependencies of target sonarobstacleavoid
        [ 83%] Building CXX object CMakeFiles/sonarobstacleavoid.dir/sonarobstacleavoid.o
        Linking CXX executable sonarobstacleavoid
        [ 83%] Built target sonarobstacleavoid
        Scanning dependencies of target speech
        [ 91%] Building CXX object CMakeFiles/speech.dir/speech.o
        Linking CXX executable speech
        [ 91%] Built target speech
        Scanning dependencies of target wallfollow
        [100%] Building CXX object CMakeFiles/wallfollow.dir/wallfollow.o
        Linking CXX executable wallfollow
        [100%] Built target wallfollow




Troubleshooting

While installing player



Now when you run player simple.cfg (cfg file in stage's world folder), and get these errors


    • -- ============================
      --
      CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
      Please set them or make sure they are set and tested correctly in the CMake files:
      GLUT_Xmu_LIBRARY (ADVANCED)
          linked by target "lodo" in directory /home/robot/playerstage/playersrc/utils/pmap
          linked by target "lododriver" in directory /home/robot/playerstage/playersrc/utils/pmap
          linked by target "pmap" in directory /home/robot/playerstage/playersrc/utils/pmap
          linked by target "pmaptest" in directory /home/robot/playerstage/playersrc/utils/pmap

      -- Configuring incomplete, errors occurred!

    • error   : Sorry, no support for shared libraries, so can't load plugins.
      error   : You should install libltdl, which is part of GNU libtool, then re-compile player.
      error   : failed to load plugin: stageplugin
      error   : failed to parse config file simple.cfg driver blocks
  • You need to install some packages by running the commands below
    • sudo apt-get install libxmu-dev
    • sudo apt-get install libltdl-dev
    • sudo apt-get install libguile-ltdl-1
  • You would need to install player and Stage again



While Installing Stage

If you get this error below, that means, libltdl-dev is not installed
  • cmake ../
    -- The C compiler identification is GNU
    -- The CXX compiler identification is GNU
    -- Check for working C compiler: /usr/bin/gcc
    -- Check for working C compiler: /usr/bin/gcc -- works
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Check for working CXX compiler: /usr/bin/c++
    -- Check for working CXX compiler: /usr/bin/c++ -- works
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Stage version 3.2.2
    -- Operating system is Linux
    -- Build type RELEASE
    -- Checking for libtool
    -- Checking for required libraries...
    -- checking for one of the modules 'libpng'
    --   * FLTK version 1.1.10 detected via /usr/bin/fltk-config
    -- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so
    -- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so - found
    -- Looking for gethostbyname
    -- Looking for gethostbyname - found
    -- Looking for connect
    -- Looking for connect - found
    -- Looking for remove
    -- Looking for remove - found
    -- Looking for shmat
    -- Looking for shmat - found
    -- Looking for IceConnectionNumber in ICE
    -- Looking for IceConnectionNumber in ICE - found
    -- Found X11: /usr/lib/libX11.so
    -- Checking for optional libraries...
    -- checking for one of the modules 'playercore>=2.1.0'
    --   * Player version 3.1.0-svn detected at /usr/local
    -- checking for one of the modules 'websim'
      * WebSim not detected.
    -- Installation path CMAKE_INSTALL_PREFIX=/usr/local
    -- Configuring libstage
    -- Configuring libstageplugin
    CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
    Please set them or make sure they are set and tested correctly in the CMake files:
    LTDL_INCLUDE_DIR
       used as include directory in directory /home/robot/playerstage/Stage-3.2.2-Source
       used as include directory in directory /home/robot/playerstage/Stage-3.2.2-Source/libstage
       used as include directory in directory /home/robot/playerstage/Stage-3.2.2-Source/examples
       used as include directory in directory /home/robot/playerstage/Stage-3.2.2-Source/examples/ctrl
       used as include directory in directory /home/robot/playerstage/Stage-3.2.2-Source/assets
       used as include directory in directory /home/robot/playerstage/Stage-3.2.2-Source/worlds
       used as include directory in directory /home/robot/playerstage/Stage-3.2.2-Source/worlds/benchmark
       used as include directory in directory /home/robot/playerstage/Stage-3.2.2-Source/libstageplugin
    LTDL_LIB
        linked by target "stage" in directory /home/robot/playerstage/Stage-3.2.2-Source/libstage

    -- Configuring incomplete, errors occurred!
  • If you get the error below, that means, fltk is not installed
    • cmake ../
      -- Stage version 3.2.2
      -- Operating system is Linux
      -- Build type RELEASE
      -- Checking for libtool
      -- Checking for required libraries...
      --   * FLTK version 1.1.10 detected via /usr/bin/fltk-config
      CMake Error at CMakeLists.txt:150 (MESSAGE):
        OpenGL GLU not found, aborting


      CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
      Please set them or make sure they are set and tested correctly in the CMake files:
      LTDL_INCLUDE_DIR
         used as include directory in directory /home/robot/playerstage/stagesrc

      -- Configuring incomplete, errors occurred!
    • sudo apt-get install fluid
    • If you get the error below, OpenGL is not installed
    • cmake ../
      -- Stage version 3.2.2
      -- Operating system is Linux
      -- Build type RELEASE
      -- Checking for libtool
      -- Checking for required libraries...
      --   * FLTK version 1.1.10 detected via /usr/bin/fltk-config
      CMake Error at CMakeLists.txt:150 (MESSAGE):
        OpenGL GLU not found, aborting


      CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
      Please set them or make sure they are set and tested correctly in the CMake files:
      LTDL_INCLUDE_DIR
         used as include directory in directory /home/robot/playerstage/stagesrc

      -- Configuring incomplete, errors occurred!
    • sudo apt-get install glutg3-dev

Comments