Skip to content

yinloonga/vdbblox

Repository files navigation

Overview

Description

VDBblox leverages the OpenVDB data structure to incrementally build Euclidean Signed Distance Fields (ESDFs) from Truncated Signed Distance Fields (TSDFs) mapping. The framework addresses the challenges of balancing accuracy and efficiency while minimizing computational resources and memory footprint. The proposed method demonstrates superior performance in terms of accuracy and efficiency through benchmark comparisons on public RGB-D and LiDAR datasets. Additionally, VDBblox is successfully integrated into a quadrotor system, validated through real-world experiments for online path-planning.

Prerequisites

Dependencies

Target system: Ubuntu 20.04 and ROS1 Noetic with C++17

  • g++ (11.4.0)
  • cmake (3.30.1)
  • Python3 (3.8.10)
  • OpenCV (4.7.0)
  • eigen (3.3.7)
  • gflag (2.2.2)
  • glog (0.4.0)
  • OpenMP (4.5)
  • boost (1.80.0)
  • TBB (2021.10)
  • OpenVDB: (10.x)

Using OpenVDB

System Dependencies

sudo apt-get update && sudo apt-get install -y libblosc-dev libeigen3-dev

you may need to install some of dependencies libraries from source code to manually upgrade

Building OpenVDB

# clone source code
git clone https://github.com/AcademySoftwareFoundation/openvdb.git && cd openvdb

# build
cmake -B build -DCMAKE_C_COMPILER=$(which gcc) -DCMAKE_CXX_COMPILER=$(which g++) -DCMAKE_CXX_STANDARD=17 -DCMAKE_BUILD_TYPE=Release .
cmake --build build --config Release --parallel $(nproc --all)

# install
cd build && sudo make install -j

More install options can be found from the official website: https://www.openvdb.org/documentation/doxygen/build.html

Local Install

# clone source code
mkdir -p catkin_ws/src && cd catkin_ws/src
git clone https://github.com/yinloonga/vdbblox.git

# (optional) disable conda 
conda deactivate
cd ../

# build
catkin config -DCMAKE_BUILD_TYPE=Release \
		-DCMAKE_C_COMPILER=$(which gcc) \
		-DCMAKE_CXX_COMPILER=$(which g++) \
		-DCMAKE_CXX_STANDARD=17
 
catkin build -j "$(nproc --all)"

Datasets

VDBblox can work with RGB-D cameras and LiDAR datasets. It is tested using the Cow and Lady, Mai City, Newer College, Kitti datasets and MARSIM. You can modify the parameters in files with suffixed of .yaml and .launch in the config folder. To better run it with a live sensor, please enable the update_local in yaml file.

Here are two specific examples using RGB-D and LiDAR respectively for you to try quickly. If you use a PC with limited computational resources, you could slow down the playback of the rosbag by a factor rosbag play -r x. For the convenience of remote development, we need to manually start rviz for visualization and open the configuration file *.rviz in the config/rviz directory from rviz.

Quick Examples

RGB-D

Since the cow and lady is static for a while at the beginning, we can skip this period using the parameter -s 4.4

# source 
source ./devel/setup.zsh

# launch ros node
roslaunch vdbblox_ros vdbblox.launch config_file_name:=CowAndLady.yaml

# vdbblox_default.rviz
rviz
 
# play bag
rosbag play -r 0.5 -s 4.4 --clock data.bag

LiDAR

Same as above, except you have to specify a different parameter file

# source 
source ./devel/setup.zsh

# launch ros node
roslaunch vdbblox_ros vdbblox.launch config_file_name:=NewerCollege.yaml

# vdbblox_default.rviz
rviz

# play bag
rosbag play -r 0.5 -s 0.0 --clock quad_easy_lidar_labelled_tf.bag

Running with MARSIM

First, launch the MARSIM

# source
source ./devel/setup.zsh

# launch marsim ros node
roslaunch test_interface single_drone_os128.launch

# vdbblox_fpv.rviz
rviz

# control with drone with keyboard
roslaunch vdbblox_ros marsim_keyctrl.launch

After launch the Rviz, you can use W A S D on to contorl the drone's velocity, then press spacebar to stop, and Q or Ctrl+C to exit

Second, launch the program

# source
source ./devel/setup.zsh

# launch node
roslaunch vdbblox_ros vdbblox.launch config_file_name:=MARSIM.yaml

Parameters

All parameters annotations can be found at template yaml files in the config/param folder.

TODO

  • Use ROS2 callback function to process topic
  • Add local map sliding functionality for the ESDF module like in ROG-Map

Acknowledgement

This projcet is built upon serveral outstanding open-source projects. We extend our gratitude to the developers of the repositories listed below for making their code available.

Thanks again for their great works.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published