Last active
June 24, 2019 18:02
-
-
Save jgkawell/cdc35ff0c57594127ffd23743c51994d to your computer and use it in GitHub Desktop.
This script will install an OMPL development environment with all the required dependencies (libccd, OctoMap, FCL, ROS, MoveIt!) that are needed to modify OMPL and use your modification through ROS and MoveIt! See my post for more info: https://jack-kawell.com/2019/06/24/installing-ompl/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install misc needed packages | |
# Check to see if in Docker or normal Linux | |
echo "Installing basic packages" | |
if [ -f /.dockerenv ]; then | |
echo "Running in Docker: Installing sudo"; | |
apt update | |
apt -y install sudo | |
else | |
echo "Running in normal Linux: Assuming sudo installed"; | |
sudo apt update | |
fi | |
sudo apt -y upgrade | |
sudo apt -y install git build-essential cmake | |
mkdir -p ~/Documents/Software | |
# Install libccd (https://github.com/danfis/libccd): | |
echo "Installing libccd" | |
sudo apt -y install m4 | |
cd ~/Documents/Software | |
git clone https://github.com/danfis/libccd.git | |
cd libccd/ | |
mkdir build && cd build/ | |
cmake -G "Unix Makefiles" -DBUILD_SHARED_LIBS=ON .. | |
make -j `nproc` | |
sudo make install | |
# Install OctoMap (https://github.com/OctoMap/octomap/wiki/Compilation-and-Installation-of-OctoMap): | |
echo "Installing OctoMap" | |
sudo apt -y install doxygen libqt4-dev libqt4-opengl-dev libqglviewer-dev-qt4 | |
cd ~/Documents/Software | |
git clone https://github.com/OctoMap/octomap.git | |
cd octomap/ | |
mkdir build && cd build/ | |
cmake .. | |
make -j `nproc` | |
make test | |
sudo make install | |
# Install FCL (https://github.com/flexible-collision-library/fcl): | |
echo "Installing FCL" | |
sudo apt -y install libeigen3-dev | |
cd ~/Documents/Software | |
git clone https://github.com/jgkawell/fcl.git | |
mkdir build && cd build | |
cmake .. | |
make -j `nproc` | |
sudo make install | |
# Install OMPL (http://ompl.kavrakilab.org/installation.html): | |
echo "Installing OMPL" | |
sudo apt-get -y install pkg-config libboost-serialization-dev libboost-filesystem-dev libboost-system-dev libboost-program-options-dev libboost-test-dev libode-dev | |
export CXX=g++ | |
cd ~/Documents/Software | |
git clone https://github.com/ompl/ompl.git | |
cd ompl | |
mkdir -p build/Release && cd build/Release | |
cmake ../.. | |
make -j `nproc` | |
sudo make install | |
# Install ROS (https://ros.org/install): | |
echo "Installing ROS" | |
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu xenial main" > /etc/apt/sources.list.d/ros-latest.list' | |
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654 | |
sudo apt update | |
sudo apt -y install ros-kinetic-desktop-full | |
sudo rosdep init | |
rosdep update | |
echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc | |
source ~/.bashrc | |
sudo apt -y install python-rosinstall python-rosinstall-generator python-wstool | |
# Install MoveIt! (https://moveit.ros.org/install/source/): | |
echo "Installing MoveIt!" | |
cd ~/Documents/Software | |
rosdep update | |
sudo apt update | |
sudo apt dist-upgrade | |
sudo apt -y install python-catkin-tools clang-format-3.9 | |
mkdir ws_moveit | |
cd ws_moveit/ | |
source /opt/ros/kinetic/setup.bash | |
wstool init src | |
wstool merge -t src https://raw.githubusercontent.com/ros-planning/moveit/master/moveit.rosinstall | |
wstool update -t src | |
rosdep -y install --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} | |
catkin config --extend /opt/ros/${ROS_DISTRO} --cmake-args -DCMAKE_BUILD_TYPE=Release | |
catkin config --blacklist \ | |
moveit_chomp_optimizer_adapter \ | |
moveit_planners_chomp \ | |
chomp_motion_planner | |
sudo apt -y install ccache | |
ccache --max-size=10 | |
echo 'export PATH=/usr/lib/ccache:$PATH' >> $HOME/.bashrc | |
source $HOME/.bashrc | |
catkin build | |
# Remake OMPL to replace the one in MoveIt!: | |
echo "Remaking OMPL to replace the one in MoveIt!" | |
cd ~/Documents/Software/ompl | |
sudo rm -r build/ | |
mkdir -p build/Release | |
cd build/Release/ | |
cmake -DCMAKE_INSTALL_PREFIX=/opt/ros/kinetic ../.. | |
make -j `nproc` | |
sudo make install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment