This package provides ROS wrapper for CUDA implementations of Semi-Global (Block) Matching (i.e. SGM or SGBM). This package currently supports Fixstars libSGM and NVIDIA VisionWorks as stereo-matching engine.
- CUDA (compute capabilities >= 3.5)
- VisionWorks 1.6 or later
- OpenCV 3.2 or later
- CMake 3.1 or later
- ROS Melodic
Only "Build from Source" option is provided. Simply pull the source and build the package on your machine.
cd <path-to-your-catkin-workspace>/src
git clone https://github.com/WHILL/gpu_stereo_image_proc.git
cd ..
catkin_make
# Note: libSGM is automatically pulled to gpu_stereo_image_proc/libSGM as CMake's external project.
If you want to build this package on a machine which does not have any GPU, CMake would not be able to detect CUDA architecture and build may fail. In this case, you can specify CUDA architecture by providing build options.
catkin_make -DAUTO_DETECT_ARCH=OFF -DCUDA_ARCH="<your-selection>"
# e.g. -DCUDA_ARCH="-arch=sm_72" for Jetson Xavier
Basic usage of this package (e.g. subscribed/published topics, node structure) is compatible with ros-perception/image_pipeline/stereo_image_proc. Refer to its wiki for quick start.
This package contains nodelets for creating disparity images from stereo.
Nodelet which wraps Fixstars libSGM.
Nodelet which wraps NVIDIA VisionWorks.
Most of the parameters can be configured via dynamic reconfigure. These wiki pages describes configurable parameters.
This package provides an example launch file which enables you to see difference of three stereo-mathing implementations: OpenCV (CPU), libSGM (GPU) and VisionWorks (GPU).
# Launch your stereo camera
# Launch your nodelet manager
rosrun nodelet nodelet manager __name:=manager # Note that manager must be located in global namespace
# Launch image processing nodelets
roslaunch gpu_stereo_image_proc comparison.launch manager:=/manager __ns:=<namespace-of-your-camera> # Don't forget '/' before manager's name.
Note: disparity
and points2
topics are remapped with libsgm_
prefix (libSGM) and vx_
prefix (VisionWorks).
See https://youtu.be/whCAjrDg9_A
- This package is distributed under the 3-Clause BSD License.
- The underlying code of this package is forked from ros-perception/image_pipeline/stereo_image_proc which is distibuted under the 3-Clause BSD License.
- This package includes libSGM which is distributed under the Apache License 2.0.
- This package depends on VisionWorks which NVIDIA reserves all the copyrights of.