[
  {
    "path": ".travis.yml",
    "content": "sudo: true\ndist: trusty\nlanguage:\n  - generic\ncache:\n  - apt\n\njobs:\n  include:\n    - stage: OpenSceneGraph\n    - script: ./install-dependencies.sh; ./install-osg.sh\n    - stage: OpenRAVE\n    - script: ./install-dependencies.sh; ./install-fcl.sh; ./install-openrave.sh\n"
  },
  {
    "path": "README.md",
    "content": "# openrave-installation\n\nBash scripts to install OpenRAVE from source. \n\nSupported distros:\n* Ubuntu 14.04\n* Ubuntu 16.04\n* Ubuntu 18.04\n* Ubuntu 20.04\n\n## Travis - Continuous Integration\n\n[![Build Status](https://travis-ci.org/crigroup/openrave-installation.svg?branch=master)](https://travis-ci.org/crigroup/openrave-installation)\n\n\n## Installation\nRun the scripts in the following order:\n```bash\n./install-dependencies.sh\n./install-osg.sh\n./install-fcl.sh\n./install-openrave.sh\n```\n"
  },
  {
    "path": "install-dependencies.sh",
    "content": "#!/bin/bash\n#\n# Authors:\n#   Francisco Suarez <fsuarez6.github.io>\n#\n# Description:\n#   OpenRAVE Installation Script: Dependencies\n\n# Check ubuntu version\nUBUNTU_VER=$(lsb_release -sr)\nif [ ${UBUNTU_VER} != '14.04' ] && [ ${UBUNTU_VER} != '16.04' ] && [ ${UBUNTU_VER} != '18.04' ] \\\n  && [ ${UBUNTU_VER} != '20.04' ]; then\n    echo \"ERROR: Unsupported Ubuntu version: ${UBUNTU_VER}\"\n    echo \"  Supported versions are: 14.04, 16.04, 18.04, and 20.04\"\n    exit 1\nfi\n\n# Install dependencies\necho \"\"\necho \"Installing OpenRAVE dependencies...\"\necho \"\"\necho \"Requires root privileges:\"\n\n# Update\nif [ ${UBUNTU_VER} = '14.04' ]; then\n  # ROS Indigo repository\n  sudo sh -c 'echo \"deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main\" > /etc/apt/sources.list.d/ros-latest.list'\n  sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116\n  # Additional PPAs\n  sudo apt-add-repository -y ppa:imnmfotmal/libccd\nfi\nsudo apt-get update\n\n# Programs\nsudo apt-get install -y --no-install-recommends build-essential cmake doxygen \\\n  g++ git octave python-dev python-setuptools wget mlocate\nif [ ${UBUNTU_VER} = '14.04' ] || [ ${UBUNTU_VER} = '16.04' ] || [ ${UBUNTU_VER} = '18.04' ]; then\n  sudo apt-get install -y --no-install-recommends ipython python-h5py python-numpy \\\n    python-pip python-wheel python-scipy\nelif [ ${UBUNTU_VER} = '20.04' ]; then\n  sudo apt-get install -y --no-install-recommends python2 curl\n  curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py\n  sudo python2 get-pip.py\n  pip install ipython h5py numpy scipy wheel pyopengl\nfi\nif [ ${UBUNTU_VER} = '14.04' ]; then\n  sudo apt-get install -y --no-install-recommends qt4-dev-tools zlib-bin\nelif [ ${UBUNTU_VER} = '16.04' ] || [ ${UBUNTU_VER} = '18.04' ] || [ ${UBUNTU_VER} = '20.04' ]; then\n  sudo apt-get install -y --no-install-recommends qt5-default minizip\nfi\n\n# Libraries\nsudo apt-get install -y --no-install-recommends ann-tools libann-dev            \\\nlibassimp-dev libavcodec-dev libavformat-dev libeigen3-dev libfaac-dev          \\\nlibflann-dev libfreetype6-dev liblapack-dev libglew-dev libgsm1-dev             \\\nlibmpfi-dev  libmpfr-dev liboctave-dev libode-dev libogg-dev libpcre3-dev       \\\nlibqhull-dev libswscale-dev libtinyxml-dev libvorbis-dev libx264-dev            \\\nlibxml2-dev libxvidcore-dev libbz2-dev\nif [ ${UBUNTU_VER} = '14.04' ] || [ ${UBUNTU_VER} = '16.04' ] || [ ${UBUNTU_VER} = '18.04' ]; then\n  sudo apt-get install -y --no-install-recommends libsoqt-dev-common libsoqt4-dev\nelif [ ${UBUNTU_VER} = '20.04' ]; then\n  sudo apt-get install -y --no-install-recommends libsoqt520-dev\nfi\nif [ ${UBUNTU_VER} = '14.04' ]; then\n  sudo apt-get install -y --no-install-recommends collada-dom-dev libccd      \\\n  libpcrecpp0 liblog4cxx10-dev libqt4-dev\nelif [ ${UBUNTU_VER} = '16.04' ] || [ ${UBUNTU_VER} = '18.04' ] || [ ${UBUNTU_VER} = '20.04' ]; then\n  sudo apt-get install -y --no-install-recommends libccd-dev                  \\\n  libcollada-dom2.4-dp-dev liblog4cxx-dev libminizip-dev octomap-tools\nfi\n\n# Install boost\nsudo apt-get install -y --no-install-recommends libboost-all-dev libboost-python-dev\n\nif [ ${UBUNTU_VER} = '18.04' ] || [ ${UBUNTU_VER} = '20.04' ]; then\n  # Install opengl\n  pip install pyopengl\n\n  # Install RapidJSON\n  mkdir -p ~/git \n  cd ~/git && git clone https://github.com/Tencent/rapidjson.git\n  cd rapidjson && mkdir build && cd build\n  cmake .. && make -j `nproc` && sudo make install\n\n  # Install Pybind\n  cd ~/git && git clone https://github.com/pybind/pybind11.git \n  cd pybind11\n  # Set Git credentials to allow git cherry-pick\n  git config --local user.name crigroup\n  git config --local user.email crigroup@example.com\n  echo \"Random Git credentials set as: crigroup (username) and crigroup@example.com (email)\"\n  mkdir build && cd build \n  git remote add woody https://github.com/woodychow/pybind11.git \\\n    && git remote add cielavenir https://github.com/cielavenir/pybind11.git \\\n    && git fetch woody && git fetch cielavenir && git checkout v2.2.4 \\\n    && git cherry-pick 94824d68a037d99253b92a5b260bb04907c42355 \\\n    && git cherry-pick 98c9f77e5481af4cbc7eb092e1866151461e3508 \\\n    && git cherry-pick dae2d434bd806eac67e38f3c49cfc91f46e4fd88 \\\n    && git cherry-pick 2e08ce9ba75f5a2d87a6f12e6ab657ac78444e8e \\\n    && cmake .. -DPYBIND11_TEST=OFF -DPythonLibsNew_FIND_VERSION=2 \\\n    && sudo make install\nfi\n\n# updatedb for debugging purposes\nsudo updatedb\n"
  },
  {
    "path": "install-fcl.sh",
    "content": "#!/bin/bash\n#\n# Authors:\n#   Francisco Suarez <fsuarez6.github.io>\n#\n# Description:\n#   OpenRAVE Installation Script: FCL\n\n# Check ubuntu version\nUBUNTU_VER=$(lsb_release -sr)\nif [ ${UBUNTU_VER} != '14.04' ] && [ ${UBUNTU_VER} != '16.04' ] && [ ${UBUNTU_VER} != '18.04' ] \\\n  && [ ${UBUNTU_VER} != '20.04' ]; then\n    echo \"ERROR: Unsupported Ubuntu version: ${UBUNTU_VER}\"\n    echo \"  Supported versions are: 14.04, 16.04, 18.04, and 20.04\"\n    exit 1\nfi\n\n# FCL - The Flexible Collision Library\necho \"\"\necho \"Installing FCL 0.5.0 from source...\"\necho \"\"\nmkdir -p ~/git; cd ~/git\ngit clone https://github.com/flexible-collision-library/fcl\ncd fcl; git reset --hard 0.5.0\nmkdir build; cd build\ncmake .. -DFCL_BUILD_TESTS=OFF\nmake -j `nproc`\nsudo make install\n"
  },
  {
    "path": "install-openrave.sh",
    "content": "#!/bin/bash\n#\n# Authors:\n#   Francisco Suarez <fsuarez6.github.io>\n#\n# Description:\n#   OpenRAVE Installation Script\n\n# Check ubuntu version\nUBUNTU_VER=$(lsb_release -sr)\nif [ ${UBUNTU_VER} != '14.04' ] && [ ${UBUNTU_VER} != '16.04' ] && [ ${UBUNTU_VER} != '18.04' ] \\\n  && [ ${UBUNTU_VER} != '20.04' ]; then\n    echo \"ERROR: Unsupported Ubuntu version: ${UBUNTU_VER}\"\n    echo \"  Supported versions are: 14.04, 16.04, 18.04, and 20.04\"\n    exit 1\nfi\n\n# Sympy version 0.7.1\necho \"\"\necho \"Downgrading sympy to version 0.7.1...\"\necho \"\"\npip install --upgrade --user sympy==0.7.1\n\n# OpenRAVE\nif [ ${UBUNTU_VER} = '14.04' ] || [ ${UBUNTU_VER} = '16.04' ]; then\n\tRAVE_COMMIT=7c5f5e27eec2b2ef10aa63fbc519a998c276f908\n\techo \"\"\n\techo \"Installing OpenRAVE 0.9 from source (Commit ${RAVE_COMMIT})...\"\n\techo \"\"\n\tmkdir -p ~/git; cd ~/git\n\tgit clone https://github.com/rdiankov/openrave.git\nelif [ ${UBUNTU_VER} = '18.04' ] || [ ${UBUNTU_VER} = '20.04' ]; then\n\tRAVE_COMMIT=2024b03554c8dd0e82ec1c48ae1eb6ed37d0aa6e\n\techo \"\"\n\techo \"Installing OpenRAVE 0.53.1 from source (Commit ${RAVE_COMMIT})...\"\n\techo \"\"\n\tmkdir -p ~/git; cd ~/git\n\tgit clone -b production https://github.com/rdiankov/openrave.git\nfi\ncd openrave; git reset --hard ${RAVE_COMMIT}\nmkdir build; cd build\nif [ ${UBUNTU_VER} = '14.04' ] || [ ${UBUNTU_VER} = '16.04' ]; then\n  \tcmake -DODE_USE_MULTITHREAD=ON -DOSG_DIR=/usr/local/lib64/ ..\nelif [ ${UBUNTU_VER} = '18.04' ] || [ ${UBUNTU_VER} = '20.04' ]; then\n  \tcmake -DODE_USE_MULTITHREAD=ON -DOSG_DIR=/usr/local/lib64/ \\\n  \t\t-DUSE_PYBIND11_PYTHON_BINDINGS:BOOL=TRUE \t\t\t   \\\n  \t\t-DBoost_NO_BOOST_CMAKE=1 ..\nfi\nmake -j `nproc`\nsudo make install\n"
  },
  {
    "path": "install-osg.sh",
    "content": "#!/bin/bash\n#\n# Authors:\n#   Francisco Suarez <fsuarez6.github.io>\n#\n# Description:\n#   OpenRAVE Installation Script: OpenSceneGraph\n\n# Check ubuntu version\nUBUNTU_VER=$(lsb_release -sr)\nif [ ${UBUNTU_VER} != '14.04' ] && [ ${UBUNTU_VER} != '16.04' ] && [ ${UBUNTU_VER} != '18.04' ] \\\n  && [ ${UBUNTU_VER} != '20.04' ]; then\n    echo \"ERROR: Unsupported Ubuntu version: ${UBUNTU_VER}\"\n    echo \"  Supported versions are: 14.04, 16.04, 18.04, and 20.04\"\n    exit 1\nfi\n\n# OpenSceneGraph\nOSG_COMMIT=1f89e6eb1087add6cd9c743ab07a5bce53b2f480\necho \"\"\necho \"Installing OpenSceneGraph 3.4 from source (Commit ${OSG_COMMIT})...\"\necho \"\"\n\nmkdir -p ~/git; cd ~/git\ngit clone https://github.com/openscenegraph/OpenSceneGraph.git\ncd OpenSceneGraph; git reset --hard ${OSG_COMMIT}\nmkdir build; cd build\n\nif [ ${UBUNTU_VER} = '14.04' ]; then\n  cmake ..\nelif [ ${UBUNTU_VER} = '16.04' ] || [ ${UBUNTU_VER} = '18.04' ] || [ ${UBUNTU_VER} = '20.04' ]; then\n  cmake -DDESIRED_QT_VERSION=4 ..\nfi\nmake -j `nproc`\nsudo make install\nsudo make install_ld_conf\n"
  }
]