Robotino 3へのFawkesのインストール(修正版)

fawkes roboticsRobotino 3のページを参考に進めます.

  1. GCCの設定
  2. sudo apt-get install software-properties-common python-software-properties
    sudo -E add-apt-repository ppa:ubuntu-toolchain-r/test
    sudo apt-get update
    sudo apt-get install gcc-4.8 g++-4.8
    
    sudo update-alternatives --remove gcc /usr/bin/gcc-4.6
    sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.8
    sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.6
  3. boost1.46からboost1.54へ変更
  4. sudo -E add-apt-repository ppa:boost-latest/ppa
    sudo apt-get update
    sudo apt-get remove 'libboost.*'
    sudo apt-get install libboost1.54-dev libboost1.54-doc libboost-atomic1.54-dev \
        libboost-chrono1.54-dev libboost-context1.54-dev \
        libboost-coroutine1.54-dev libboost-date-time1.54-dev \
        libboost-exception1.54-dev libboost-filesystem1.54-dev \
        libboost-graph1.54-dev libboost-graph-parallel1.54-dev \
        libboost-iostreams1.54-dev libboost-locale1.54-dev \
        libboost-log1.54-dev libboost-math1.54-dev libboost-mpi1.54-dev \
        libboost-mpi-python1.54-dev libboost-program-options1.54-dev \
        libboost-python1.54-dev libboost-random1.54-dev \
        libboost-regex1.54-dev libboost-serialization1.54-dev \
        libboost-signals1.54-dev libboost-system1.54-dev \
        libboost-test1.54-dev libboost-thread1.54-dev \
        libboost-timer1.54-dev libboost-wave1.54-dev default-jdk fop \
        libboost1.54-all-dev libtinyxml-dev \
        libfltk1.1-dev libnetpbm10-dev libsdl-image1.2-dev \
        libhdf5-serial-dev 
    
  5. ROSのインストール
  6. # Add ROS package repository, required e.g. for bullet
    sudo sh -c 'echo "deb http://files.fawkesrobotics.org/packages/robotino3/ubuntu precise main" > /etc/apt/sources.list.d/fawkes-robotino3.list'
    wget http://files.fawkesrobotics.org/packages/robotino3/ubuntu/fawkes-robotino3.key -O - | sudo apt-key add -
    
    # Repository which has a new version of libmicrohttpd
    sudo -E add-apt-repository -y ppa:openvas/stable
    
    # Recent CLIPS/clipsmm versions
    sudo -E add-apt-repository -y ppa:timn/clips
    
    sudo apt-get update
    sudo apt-get upgrade
    
    sudo apt-get install build-essential git-core g++ vim asciidoc doxygen \
      libmagic-dev libssl-dev libavahi-client-dev libsqlite3-dev libxml++2.6-2 libxml++2.6-dev \
      libdaemon-dev libmicrohttpd10-dev  liblua5.1-0-dev libtolua++5.1-dev yaml-cpp \
      libdc1394-22-dev libbluetooth-dev libbullet-dev libelf-dev \
      libjpeg-dev libtiff4-dev libjpeg8-dev libjpeg-turbo8-dev libpng12-dev \
      libopencv-dev libopencv-objdetect-dev libopencv-highgui-dev libopencv-calib3d-dev \
      libopencv-features2d-dev libopencv-legacy-dev libopencv-contrib-dev \
      librrd-dev graphviz libgraphviz-dev flite1-dev libasound2-dev \
      libxmlrpc-c3-dev libgl1-mesa-dev freeglut3-dev libsdl1.2-dev liburg0-dev \
      libgtkmm-3.0-dev libcairomm-1.0-dev libgconfmm-2.6-dev \
      libclipsmm-dev libprotobuf-dev libprotoc-dev protobuf-compiler \
      mongodb-dev mongodb-server devscripts
    
    wget http://files.fawkesrobotics.org/packages/robotino3/ubuntu/pool/main/p/pcl-1.7/pcl-1.7_1.7.0-2+precise2.debian.tar.gz
    wget http://files.fawkesrobotics.org/packages/robotino3/ubuntu/pool/main/p/pcl-1.7/pcl-1.7_1.7.0-2+precise2.dsc
    wget http://files.fawkesrobotics.org/packages/robotino3/ubuntu/pool/main/p/pcl-1.7/pcl-1.7_1.7.0.orig.tar.gz
    dpkg-source -x pcl-1.7_1.7.0-2+precise2.dsc 
    cd pcl-1.7-1.7.0
    debuild -uc -us -b
    sudo dpkg -i *pcl*.deb
    
    # Fix a bug in the PCL 1.7 pkg-config files
    for f in people segmentation visualization; do \
      sudo sed -i -e 's/pcl_geometry-1.7 //' /usr/lib/pkgconfig/pcl_$f-1.7.pc; \
    done
    

    ROS のインストールは,apt だとfawkesrobotics.org を取りに行かないので,
    パッケージファイルを手作業でダウンロードして下さい.
    fawkesrobotics.orgから全てダウンロード.

    sudo dpkg -i ros*.deb
    
    echo "source /opt/ros/fuerte/setup.bash" >> ~/.bashrc
    source /opt/ros/fuerte/setup.bash

    2016/06/15現在,apt-get upgrade でros のパッケージを更新すると,fawkesのmake で,いくつかの警告が出るようになりました.
    そしてfawkes では,警告 = エラーとしているため,コンパイルできなくなります.
    (この前までは,upgrade しても問題なかったのですが…)
    とりあえずの対処法として,上記のsudo dpkg -i *pcl*.deb からの作業をもう一度して,古いパッケージに戻したら,直りました.
    ただし,これはコンパイル可能な段階のros パッケージの時に,robotino のインストール作業をしていた場合のみ有効で,現在新規で作業している場合は,無理です.

  7. ccacheの設定
  8. sudo apt-get install -y ccache
    echo 'export PATH="/usr/lib/ccache:$PATH"' | tee -a ~/.bashrc \ && source ~/.bashrc && echo $PATH
    which g++ gcc
    • 以下の出力が出たらOkです.
    • /usr/lib/ccache:/opt/ros/fuerte/bin:/usr/lib/ccache:/opt/ros/fuerte/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
      /usr/lib/ccache/g++
      /usr/lib/ccache/gcc
    • 以下の設定をしましょう.
    ccache -F 0 && ccache -M 2
  9. OpenRobotino daemonsの無効化
  10. sudo update-rc.d -f joystick.sh remove
    sudo update-rc.d lighttpd disable
    sudo su -c "echo manual > /etc/init/fleetcomd.override"
    
    for f in 99-camd2.rules 99-ftdid.rules 99-joystick.rules; do
      sudo sed -e 's/^\(.\)/#\1/' -i /etc/udev/rules.d/$f
    done
  11. Socket権限の修正
  12. sudo cat <<EOM >>/etc/init/rpcd.conf
    post-start script
      sleep 5
      chmod 666 /tmp/__REC__RPC__12080__
    end script
    
    EOM
  13. fawkes のダウンロード
  14. cat << EOF >> ~/.bashrc
    export FAWKES_DIR=~/fawkes-robotino
    export GAZEBO_RCLL=~/gazebo-rcll
    export GAZEBO_PLUGIN_PATH=\$GAZEBO_PLUGIN_PATH:\$GAZEBO_RCLL/plugins/lib/gazebo
    export GAZEBO_MODEL_PATH=\$GAZEBO_RCLL/models
    export GAZEBO_MODEL_PATH=\$GAZEBO_MODEL_PATH:\$GAZEBO_RCLL/models/carologistics
    	 
    export LLSF_REFBOX_DIR=~/llsf-refbox
    export GAZEBO_WORLD_PATH=~/gazebo-rcll/worlds/carologistics/llsf.world
    EOF
    source ~/.bashrc
    
    cd
    wget https://files.fawkesrobotics.org/releases/fawkes-robotino-2015.tar.bz2 --no-check-certificate
    tar xf fawkes-robotino-2015.tar.bz2
    cd fawkes-robotino
    make -j4 clean all gui

    これで完成.

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

*