Voxblox Documentation

repository·master·Indexed 23 days ago

https://github.com/ethz-asl/voxblox

A CPU-based volumetric mapping library centered around Truncated Signed Distance Fields (TSDFs), capable of generating Euclidean Signed Distance Fields (ESDFs) for robotics applications such as on-board MAV planning. It features ROS integration via the voxblox_ros package, protobuf-based serialization, and supports both Merged and Fast integrators for varying performance and accuracy needs.

Tokens
6.3K
Snippets
12
Records
36
Agent score
82%

What's inside Voxblox

  1. Overview of Voxblox volumetric mapping

    master

    Voxblox is a volumetric mapping library primarily based on Truncated Signed Distance Fields (TSDFs). It is designed for incremental 3D mapping and can be used for generating Euclidean Signed Distance Fields (ESDFs/EDTs) directly from TSDFs.

    Key features include:

    • CPU-only execution: Supports both single-threaded and multi-threaded operation for certain integrators.
    • Extensible Layer Types: Supports multiple different layer types containing different voxel types.
    • Serialization: Uses protobufs for data serialization.
    • Flexible Integration: Offers different methods for handling weighting during merging and inserting scan pose information.
    • ROS Integration: Tight integration via the voxblox_ros package.
    • Extensibility: Easily extensible with custom integrators.
    • ESDF Generation: Built-in implementation for building ESDFs from TSDFs.
  2. Understand Voxblox vs Octomap performance

    master

    When comparing Voxblox to Octomap for integration tasks:

    1. Integration Speed: Voxblox's Fast integrator is significantly faster than Octomap, particularly as the Max ray length or Voxel size increases. While Octomap's integration time scales poorly with ray length (e.g., 3748 ms/scan for 0.1m voxels at 50m range), Voxblox maintains much lower latency (e.g., 100 ms/scan for the same parameters).
    2. Memory Usage: Voxblox typically uses 2 to 3 times more RAM than Octomap.
    3. Integration Method: Octomap ray casts all points from the origin without approximation. Voxblox's Merged integrator uses a similar approach, but the Fast integrator uses approximation techniques to achieve higher performance.
  3. Understand Voxblox Map abstractions

    master
    Voxblox maps are the primary data structures used to hold and maintain access to individual voxels. These voxels contain the volumetric information that represents the environment. The maps organize voxels spatially to allow for efficient access and updates to the volume.
  4. The Docs Generation Structure

    master

    The Voxblox documentation is generated using a pipeline of Exhale, Doxygen, Sphinx, and Breathe.

    Key files in the docs/ directory:

    • conf.py: A Python script that controls Sphinx execution, loads Breathe/Exhale extensions, and configures the project.
    • Doxyfile: Contains configuration options for Doxygen.
    • index.rst: The homepage of the generated site (in .rst format). It defines the Sphinx TOC Tree used in the sidebar.
    • logo.gif: The project logo image.
    • Makefile: Used to build the website via Sphinx.
    • requirements.txt: Used by ReadTheDocs to install the Exhale extension.
    • pages/: A folder containing additional wiki pages in .rst or .md format.
  5. Compare Merged vs Fast Integrators

    master

    Voxblox provides two main types of integrators: Merged and Fast.

    • Merged Integrator: Prioritizes accuracy and follows a standard approach. It is generally slower for TSDF updates, especially as voxel size decreases.
    • Fast Integrator: Optimized for speed. It significantly reduces TSDF integration time compared to the Merged integrator, making it more suitable for real-time applications.

    Performance varies significantly based on the chosen Voxel size. As voxel size decreases (e.g., from 20 cm to 2 cm), both the TSDF integration time and the Total RAM usage increase substantially.

    Typical performance characteristics (on an i7-4810MQ CPU):

    • 20 cm Voxel size: Fast integrator takes ~20 ms/scan; Merged takes ~56 ms/scan.
    • 5 cm Voxel size: Fast integrator takes ~23 ms/scan; Merged takes ~112 ms/scan.
    • 2 cm Voxel size: Fast integrator takes ~63 ms/scan; Merged takes ~527 ms/scan.
  6. How ESDF generation works in Voxblox

    master

    Voxblox generates Euclidean Signed Distance Fields (ESDF) by propagating values from a Truncated Signed Distance Field (TSDF). The process is incremental and relies on two wavefront algorithms to update distance values efficiently:

    1. TSDF to ESDF Propagation: TSDF values (which represent the distance to the nearest surface within a truncated range) are used as the starting point for calculating the ESDF (which represents the true distance to the nearest surface).
    2. Raise Wavefront: This mechanism handles the propagation of increasing distance values.
    3. Lower Wavefront: This mechanism handles the propagation of decreasing distance values.

    For a detailed mathematical description of the algorithm, refer to the original paper: 'Voxblox: Incremental 3D Euclidean Signed Distance Fields for On-Board MAV Planning' (IROS 2017).

  7. Use tsdf_server and esdf_server instead of voxblox_node

    master

    The legacy voxblox_node has been replaced by two specialized servers:

    • Use tsdf_server if you only require a Truncated Signed Distance Function (TSDF).
    • Use esdf_server if you require both a TSDF and an Euclidean Signed Distance Field (ESDF).

    These servers handle the integration of pointclouds and provide services for mesh generation, map saving/loading, and map publishing.

  8. Clone and initialize voxblox dependencies via HTTPS

    master

    If you are not using SSH keys, clone the repository via HTTPS and use wstool to initialize and update the dependencies using the voxblox_https.rosinstall file.

    cd ~/catkin_ws/src/
    git clone https://github.com/ethz-asl/voxblox.git
    wstool init . ./voxblox/voxblox_https.rosinstall
    wstool update
  9. Build the Voxblox documentation locally

    master

    To compile the online documentation on your local machine, you must install the necessary system dependencies and Python packages, then use make to generate the HTML files.

    Dependencies

    System packages:

    sudo apt-get install python-pip doxygen python-pyaudio

    Python packages:

    pip install sphinx exhale breath sphinx_rtd_theme recommonmark --user

    Compilation

    Navigate to the documentation directory and run make html:

    cd ~/catkin_ws/src/voxblox/voxblox/docs
    make html

    This generates a docs/_build folder. The homepage is located at docs/_build/html/index.html. Note that Sphinx may produce many warnings during this process; these can typically be ignored.

    cd ~/catkin_ws/src/voxblox/voxblox/docs
    make html
  10. Clone and initialize voxblox dependencies via SSH

    master

    If you are using SSH keys for GitHub (recommended), clone the repository and use wstool to initialize and update the dependencies using the voxblox_ssh.rosinstall file.

    cd ~/catkin_ws/src/
    git clone git@github.com:ethz-asl/voxblox.git
    wstool init . ./voxblox/voxblox_ssh.rosinstall
    wstool update