Skip to content
danielduberg edited this page May 4, 2021 · 31 revisions

Packages

UFOMap is a single package that can be built as a standalone CMake project or with Catkin for easy ROS integration. It utilizes C++17 and the different execution policies, so a modern C++ compiler is required.

Dependencies

There are only two dependencies. If there is a huge desire for these to be optional dependencies, we can make it happen.

Is needed to be able to use the different execution policies introduced in C++17.

Intel(R) Threading Building Blocks 2018 is required.

To install it run sudo apt install libtbb-dev.

This is a fast compression algorithm that can be used to compress/decompress UFOMap maps when either saving/loading them to/from disk or when sending them between different ROS nodes.

This should be available by default in Ubuntu.

Using UFOMap in CMake Projects

To use UFOMap for your project, add this to your CMakeLists.txt:

find_package(ufomap REQUIRED)

add_executable(example example.cpp)
target_link_libraries(example UFO::Map)

Installation

Installation as a ROS package instruction for Ubuntu 20.04 with GNU C++ compiler version 10.2.0 and ROS Noetic.

NOTE: instructions for Ubuntu 18.04 and ROS Melodic can be found in this discussion page. However, most of the development and testing is done on Ubuntu 20.04 and ROS Noetic.

Prerequisites

  1. Make sure you have installed ROS Noetic (desktop-full is recommended).

  2. It is also recommended to use Catkin Tools.

sudo apt install python3-catkin-tools python3-osrf-pycommon
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws
catkin init # Init Catkin workspace
catkin config --extend /opt/ros/noetic  # exchange noetic for your ros distro if necessary
catkin config --cmake-args -DCMAKE_BUILD_TYPE=Release # To enable release mode compiler optimzations

It is assumed that your Catkin workspace is in ~/catkin_ws.

Installation

  1. Install system dependencies
sudo apt install libtbb-dev
  1. Move into your Catkin workspace
cd ~/catkin_ws/src
  1. Clone UFOMap using either SSH or HTTPS
git clone git@github.com:UnknownFreeOccupied/ufomap.git

or

git clone https://github.com/UnknownFreeOccupied/ufomap.git
  1. Compile and source
# Install all dependencies. Not really needed since we already installed TBB above
rosdep install --from-paths . --ignore-src -r -y
# Build your workspace
catkin build
# Source your workspace
source ../devel/setup.bash

ROS Integration

For further ROS integration please see ufomap_ros. ufomap_ros makes it possible to easily share a map between multiple nodes, convert between UFOMap types and ROS types, as well as visualizing the UFOMap in RViz.

Next Step

Please see Tutorials for tutorials on how to use UFOMap.