Skip to content

Installation on Ubuntu

Margarita Grinvald edited this page May 15, 2020 · 29 revisions

Installing voxblox++ on Ubuntu 16.04 or 18.04

Prerequisites

Install ROS following the instructions at the ROS installation page. The full install (ros-kinetic-desktop-full, ros-melodic-desktop-full) are recommended.

Make sure to source your ROS setup.bash script by following the instructions on the ROS installation page.

Requirements

  • Python 2.7 (required for ROS support)
  • protobuf>=3.0 (required for tensorflow)
  • scipy, scikit-image, IPython, Numpy, Pillow, cython, h5py (required for Mask R-CNN)
  • Keras>=2.0.8
  • TensorFlow>=1.3

For bounding box computation with approxmvbb_catkin

  • gcc>=5.2 (required for C++14 support)
  • CMake 3.8 or later (required for AddressSanitizer)

Install dependencies

sudo apt update
sudo apt install python-dev python-pip python-wstool protobuf-compiler dh-autoreconf

pip2 install 'protobuf>=3.0.0a3' scipy scikit-image ipython 'keras==2.1.6'
pip2 install tensorflow-gpu # If GPU is available, else tensorflow 

Install voxblox++

In your terminal, define the installed ROS version and name of the catkin workspace to use:

export ROS_VERSION=kinetic # (Ubuntu 16.04: kinetic, Ubuntu 18.04: melodic)
export CATKIN_WS=~/catkin_ws

If you don't have a catkin workspace yet, create a new one:

mkdir -p $CATKIN_WS/src && cd $CATKIN_WS
catkin init
catkin config --extend /opt/ros/$ROS_VERSION --merge-devel 
catkin config --cmake-args -DCMAKE_CXX_STANDARD=14 -DCMAKE_BUILD_TYPE=Release
wstool init src

Clone the voxblox_plusplus repository over HTTPS (no Github account required) and automatically fetch dependencies:

cd $CATKIN_WS/src
git clone --recurse-submodules https://github.com/ethz-asl/voxblox-plusplus.git
wstool merge -t . voxblox-plusplus/voxblox-plusplus_https.rosinstall
wstool update

Alternatively, clone over SSH (Github account required):

cd $CATKIN_WS/src
git clone --recurse-submodules git@github.com:ethz-asl/voxblox-plusplus.git
wstool merge -t . voxblox-plusplus/voxblox-plusplus_ssh.rosinstall
wstool update

Build and source the voxblox++ packages:

catkin build mask_rcnn_ros depth_segmentation gsm_node
source ../devel/setup.bash # (bash shell: ../devel/setup.bash,  zsh shell: ../devel/setup.zsh)

Troubleshooting

Compilation freeze (see this issue)

By default catkin build on a computer with N CPU cores will run N make jobs simultaneously. If compilation seems to hang forever, it might be running low on RAM. Try limiting the number of maximum parallel build jobs through the -jN flag to a value way lower than your CPU count, i.e.

catkin build mask_rcnn_ros depth_segmentation gsm_node -j4

If it still freezes at compilation time, you can go as far as limiting the maximum number of parallel build jobs and max load to 1 through the -lN flag:

catkin build mask_rcnn_ros depth_segmentation gsm_node -j1 -l1

Compilation fails when building the entire workspace

Voxblox++ depends on a number of packages which, in turn, have dependencies of their own that are not necessarily dependencies of Voxblox++. For this reason, building the entire workspace can result in a failure.

Either specify to build only the Voxblox++ packages as:

catkin build mask_rcnn_ros depth_segmentation gsm_node

or exclude any failing package from the build by adding a CATKIN_IGNORE file in its folder.