A standalone ROS2 C++ package that wraps the vdbfusion library for flexible and efficient TSDF Integration.
Modified from the original ROS1 library vdbfusion_ros and main vdbfusion library.
- Added the original vdbfusion library to this package, allowing for the package to be built using colcon
- Build the original library with ROS pre-installed OpenVDB PRBonn/vdbfusion#43
- Ported the original ROS1 C++ wrapper to ROS2, with the following changes:
- Updated the helper functions for converting and preprocessing PointCloud2 messages
- Removed the vdbfusion::Transform class, the node now relies on tf2 natively
- Removed the saveVDBVolume service
- Added parameters and functions to visualize the TSDF integration using RViz with the visualization_markers package
- Rewrote the node and launch files to work as a ROS2 component node
- Ported the launch file to ROS2, using composable nodes together with depth image proc to interface the original library with depth image streams
# Install OpenVDB dependencies
sudo apt update && apt install --no-install-recommends -y \
libblosc-dev \
libboost-iostreams-dev \
libboost-system-dev \
libboost-system-dev \
libeigen3-dev
# Install OpenVDB from openvdb-vendor
sudo apt update && sudo apt install --no-install-recommends -y ros-humble-openvdb-vendorVDBFusion is now built alongside the ROS2 package using colcon
For now only ROS Humble has been tested.
As an extra dependency install: sudo apt install ros-humble-tf2-sensor-msgs.
On your catkin workspace, clone the vdbfusion_ros:
cd colcon_ws/src/
git clone https://github.com/PRBonn/vdbfusion_ros.git
colcon build - Create a config file compatible with your dataset and desired tsdf integration parameters using this default configuration
- Create a launch file using the default launch file the depth image topic name for the depth-image-proc node can be changed
remappings=[
('image_rect', '/camera/depth/image_raw'), # change the /camera/depth/image_raw to your depth image topic
('camera_info', '/camera/depth/camera_info'), # change the /camera/depth/camera_info to your depth camera info topic
('points', '/input/pointcloud')
]- The data can be published either through a rosbag file or directly from another ros node
ros2 launch vdbfusion_ros2 vdbfusion_ros2.launch.pyBy default, the TSDF grid is published to /output/tsdf and the mesh is published to /output/mesh. This was tested on the SceneNN dataset.
Below images show Sequence 78 with voxel size set to 0.02 and truncation distance set to 0.06.
The mesh and tsdf marker colours can be changed in the vdbfusion_node.cpp file in the vdbVolumeToCubeMarker() and vdbVolumeToMeshMarker() functions.
Download the dataset rosbag files from the respective links and modify the launch and config files.
Run the launch command with your custom launch file and use ros2 bag play [PATH_TO_YOUR_ROSBAG] to start your ros2bag
If you use this library for any academic work, please cite the original paper.
@article{vizzo2022sensors,
author = {Vizzo, Ignacio and Guadagnino, Tiziano and Behley, Jens and Stachniss, Cyrill},
title = {VDBFusion: Flexible and Efficient TSDF Integration of Range Sensor Data},
journal = {Sensors},
volume = {22},
year = {2022},
number = {3},
article-number = {1296},
url = {https://www.mdpi.com/1424-8220/22/3/1296},
issn = {1424-8220},
doi = {10.3390/s22031296}
}
