GithubHelp home page GithubHelp logo

ros-industrial / yak Goto Github PK

View Code? Open in Web Editor NEW
131.0 11.0 25.0 3.74 MB

A library for integrating depth images into Truncated Signed Distance Fields.

License: MIT License

CMake 2.62% C++ 79.85% Cuda 15.87% Shell 0.13% Dockerfile 1.53%

yak's Introduction

Yak

GitHub Actions status GitHub issues open license - MIT support level: consortium / vendor

Yak is a library for integrating depth images into Truncated Signed Distance Fields (TSDFs). It is currently supported for Ubuntu 16.04 and Ubuntu 18.04. An example ROS node using Yak is provided in the yak_ros repository.

A ROS interface is provided at yak_ros, and a ROS2 interface is provided at yak_ros2;

Attribution

This library was originally a fork of personalrobotics/kinfu_ros, and the underlying TSDF algorithm is very similar to the implementation used there.

Technical Background

A TSDF is a probabilistic representation of a solid surface in 3D space. It is a useful tool for combining many noisy incomplete sensor readings into a single smooth and complete model.

To break down the name:

  • Distance Field: Each voxel in the volume contains a value that represents its metric distance from the closest point on the surface. Voxels very far from the surface have high-magnitude distance values, while those near the surface have values approaching zero.

  • Signed: Voxels outside the surface have positive distances, while voxels inside the surface have negative distances. This allows the representation of solid objects. The distance field represents a gradient that shifts from positive to negative as it crosses the surface.

  • Truncated: Voxels further than a specified distance from the isosurface have their values capped at +/- 1 because we are only interested in precisely representing the region of the volume close to solid objects.

The TSDF algorithm can be efficiently parallelized on a general-purpose graphics processor, which allows data from RGB-D cameras to be integrated into the volume in real time. Numerous observations of an object from different perspectives average out noise and errors due to specular highlights and interreflections, producing a smooth continuous surface. This is a key advantage over equivalent point-cloud-centric strategies, which require additional processing to distinguish between engineered features and erroneous artifacts in the scan data. The volume can be converted to a triangular mesh using the Marching Cubes algorithm for consumption by application-specific processes.

Example Output

The picture below shows a mode of an aluminum part that was reconstructed using the TSDF algorithm and meshed using the Marching Cubes algorithm.

An aluminum part reconstructed as a TSDF and meshed with the Marching Cubes algorithm.

Dependencies

CMake

Yak requires CMake 3.10.0 or newer in order to take advantage of improved support for CUDA. If you're using Ubuntu 18.04 or newer you should already have a suitable version. If you're using an older distribution (e.g. 16.04) you will need to install a compatible version of CMake yourself.

  1. Install pip (if it isn't already installed):
sudo apt install python-pip
  1. Use pip to install a newer version of CMake locally, which will not overwrite the system installation of CMake.
pip install --user cmake --upgrade
  1. (Optional, depending on the specifics of your environment) Prepend the directory where CMake was just installed to the PATH environment variable. You may also add this to .bashrc.
export PATH=:/home/YOUR_USERNAME/.local/bin:$PATH

CUDA

Yak requires an NVidia GPU and CUDA 9.0 or newer.

  1. CUDA depends on Nvidia third-party drivers and will not work with the default Nouveau drivers. Determine which version of the Nvidia driver is compatible with your computer's GPU by running ubuntu-drivers devices. Usually the driver version listed as "third-party free recommended" is suitable. You can install the recommended driver using sudo ubuntu-drivers autoinstall. Example output listed below:
== /sys/devices/pci0000:00/0000:00:02.0/0000:02:00.0 ==
modalias : pci:v000010DEd000017C8sv00001458sd000036CBbc03sc00i00
vendor   : NVIDIA Corporation
model    : GM200 [GeForce GTX 980 Ti]
driver   : nvidia-driver-418 - third-party free recommended
driver   : nvidia-driver-410 - third-party free
driver   : nvidia-driver-390 - distro non-free
driver   : xserver-xorg-video-nouveau - distro free builtin
  1. Consult the chart below (copied from here as of Februray 13 2021) to find which CUDA version is compatible with the drivers supported by your GPU. Yak is currently not compatible with CUDA <= 8.0.
CUDA Toolkit Linux x86_64 Driver Version
CUDA 11.2 >= 450.80.02
CUDA 11.1 (11.1.0) >= 450.80.02
CUDA 11.0 (11.0.3) >= 450.36.06
CUDA 10.2 (10.2.89) >= 440.33
CUDA 10.1 (10.1.105) >= 418.39
CUDA 10.0 (10.0.130) >= 410.48
CUDA 9.2 (9.2.88) >= 396.26
CUDA 9.1 (9.1.85) >= 390.46
CUDA 9.0 (9.0.76) >= 384.81
CUDA 8.0 (8.0.61 GA2) >= 375.26
CUDA 8.0 (8.0.44) >= 367.48
CUDA 7.5 (7.5.16) >= 352.31
CUDA 7.0 (7.0.28) >= 346.46
  1. Specific installation instructions vary depending on the combination of Ubuntu version, CUDA version, and Nvidia driver version. Please read the linked instructions carefully: they are very important, and CUDA may not work correctly if you skip a step!
  1. Follow the instructions in Post-installation Actions. It is not necessary to complete the steps listed under "POWER9 Setup" -- you probably do not have a POWER9-compatible system unless you work with supercomputers.

OpenMP

Yak requires OpenMP for parallelization of the marching cubes surface reconstruction process.

sudo apt install libomp-dev

OpenCV

Yak requires OpenCV 3.0 or newer. If you are using ROS then this dependency is already satisfied. Otherwise you will need to install it yourself:

sudo apt install libopencv-dev

Eigen

Yak requires Eigen 3. If you are using ROS then this dependency is already satisfied. Otherwise you will need to install it yourself:

sudo apt install libeigen3-dev

PCL

Yak requires PCL 1.8 or newer. If you are using ROS then this dependency is already satisfied. Otherwise you will need to install it yourself:

sudo apt install libpcl-dev

ros_industrial_cmake_boilerplate

Yak depends on the ros_industrial_cmake_boilerplate package to facilitate package setup and installation.

Installation

Build with ROS (recommended)

Installing ROS is beyond the scope of this readme. There are installation instructions here for ROS1 and here for ROS2.

Clone this package into the src directory of a ROS workspace. For ROS1 use catkin build to build the workspace. For ROS2 use colcon build to build the workspace.

Take a look at the yak_ros package for example implementations of ROS nodes using Yak.

Build Standalone (in development)

git clone https://github.com/ros-industrial/yak.git
cd yak
mkdir build
cd build
cmake ../yak
make
sudo make install

Examples

yak_ros and yak_ros2 provide instructions for building and running ROS demo applications.

yak's People

Contributors

akgoins avatar austinderic avatar dave992 avatar ipa-nhg avatar ipa-rwu avatar levi-armstrong avatar mpowelson avatar schornakj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

yak's Issues

[tsdf_node-3] process has died [pid 8271, exit code -11

Hi,

Issue description:
Hi, I'm trying to run the Yak_ros demo on my newly purchased PC with RTX 3070 GPU.
According to the ReadMe file of "Yak" and "Yak_ros", the workspace was successfully compiled with some warnings.
I source the "setup.bash" file in the "devel" folder and tried to run the demo, I got the error of : [tsdf_node-3] process has died.

Detailed info is in the Yak_ros
https://github.com/ros-industrial/yak_ros/issues/53

Could you please help me to check the problem and give me a hint?
Many thanks for your help!

Requires PCL 1.9

This package requires PCL 1.9, but this is only mentioned in the CMakeLists.txt file. It may be nice to include it in the README file when setup instructions are added.

Associate camera intrinsics with individual images

As opposed to current approach, where intrinsics and image resolution are stored as members of the Kinfu class and initialized only at startup. If unique properties can be tied to each image then it would open the possibility of fusing data from multiple cameras simultaneously.

Dataset for testing

Hi,
Thank you for nice work.
Can you provide the dataset for testing the package or an example (possibly how to test by using a set of RGB-D images)?

Bad compile definitions and "error: macro names must be identifiers" with PCL 1.8.1

There seems to be a bug in PCL 1.8.1 where an empty compile definition is added when using target_compile_definitions. The current upstream devel branch will be broken on PCL 1.8.1 until this is resolved (sorry).

Relevant subset of verbose output when building against PCL 1.8.1 while using target_compile_definitions(${PROJECT_NAME}_frontend PUBLIC ${PCL_DEFINITIONS}), which fails. Note the empty -D definition, which I think is the culprit:

[ 75%] Building CXX object CMakeFiles/yak_frontend.dir/src/yak_server.cpp.o
/usr/bin/c++  -D  -DDISABLE_DAVIDSDK -DDISABLE_DSSDK -DDISABLE_LIBUSB_1_0 -DDISABLE_PCAP -DDISABLE_PNG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DvtkFiltersFlowPaths_AUTOINIT="1(vtkFiltersParallelFlowPaths)" -DvtkIOExodus_AUTOINIT="1(vtkIOParallelExodus)" -DvtkIOGeometry_AUTOINIT="1(vtkIOMPIParallel)" -DvtkIOImage_AUTOINIT="1(vtkIOMPIImage)" -DvtkIOParallel_AUTOINIT="1(vtkIOMPIParallel)" -DvtkIOSQL_AUTOINIT="2(vtkIOMySQL,vtkIOPostgreSQL)" -DvtkRenderingContext2D_AUTOINIT="1(vtkRenderingContextOpenGL)" -DvtkRenderingCore_AUTOINIT="3(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingOpenGL)" -DvtkRenderingFreeType_AUTOINIT="2(vtkRenderingFreeTypeFontConfig,vtkRenderingMatplotlib)" -DvtkRenderingLIC_AUTOINIT="1(vtkRenderingParallelLIC)" -DvtkRenderingVolume_AUTOINIT="1(vtkRenderingVolumeOpenGL)" -Dyak_frontend_EXPORTS -isystem /usr/include/vtk-6.3 -isystem /usr/include/freetype2 -isystem /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -isystem /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/opal/mca/event/libevent2022/libevent -isystem /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/opal/mca/event/libevent2022/libevent/include -isystem /usr/lib/x86_64-linux-gnu/openmpi/include -isystem /usr/include/python2.7 -isystem /usr/include/x86_64-linux-gnu -isystem /usr/include/hdf5/openmpi -isystem /usr/include/libxml2 -isystem /usr/include/jsoncpp -isystem /usr/include/tcl -I/home/mrtd/other_workspaces/yak_melodic_ws/src/yak/yak/include -isystem /usr/include/pcl-1.8 -isystem /usr/include/eigen3 -isystem /usr/local/include/pcl-1.9 -isystem /usr/include/ni -isystem /usr/include/openni2 -isystem /opt/ensenso/development/c/include -isystem /usr/local/include -isystem /usr/local/include/opencv -isystem /usr/local/cuda-10.1/targets/x86_64-linux/include -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -isystem /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++  -fPIC   -fPIC -std=gnu++14 -o CMakeFiles/yak_frontend.dir/src/yak_server.cpp.o -c /home/mrtd/other_workspaces/yak_melodic_ws/src/yak/yak/src/yak_server.cpp
<command-line>:0:1: error: macro names must be identifiers
[ 80%] Building CXX object CMakeFiles/yak_frontend.dir/src/kfusion/tsdf_container.cpp.o
/usr/bin/c++  -D  -DDISABLE_DAVIDSDK -DDISABLE_DSSDK -DDISABLE_LIBUSB_1_0 -DDISABLE_PCAP -DDISABLE_PNG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DvtkFiltersFlowPaths_AUTOINIT="1(vtkFiltersParallelFlowPaths)" -DvtkIOExodus_AUTOINIT="1(vtkIOParallelExodus)" -DvtkIOGeometry_AUTOINIT="1(vtkIOMPIParallel)" -DvtkIOImage_AUTOINIT="1(vtkIOMPIImage)" -DvtkIOParallel_AUTOINIT="1(vtkIOMPIParallel)" -DvtkIOSQL_AUTOINIT="2(vtkIOMySQL,vtkIOPostgreSQL)" -DvtkRenderingContext2D_AUTOINIT="1(vtkRenderingContextOpenGL)" -DvtkRenderingCore_AUTOINIT="3(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingOpenGL)" -DvtkRenderingFreeType_AUTOINIT="2(vtkRenderingFreeTypeFontConfig,vtkRenderingMatplotlib)" -DvtkRenderingLIC_AUTOINIT="1(vtkRenderingParallelLIC)" -DvtkRenderingVolume_AUTOINIT="1(vtkRenderingVolumeOpenGL)" -Dyak_frontend_EXPORTS -isystem /usr/include/vtk-6.3 -isystem /usr/include/freetype2 -isystem /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -isystem /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/opal/mca/event/libevent2022/libevent -isystem /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/opal/mca/event/libevent2022/libevent/include -isystem /usr/lib/x86_64-linux-gnu/openmpi/include -isystem /usr/include/python2.7 -isystem /usr/include/x86_64-linux-gnu -isystem /usr/include/hdf5/openmpi -isystem /usr/include/libxml2 -isystem /usr/include/jsoncpp -isystem /usr/include/tcl -I/home/mrtd/other_workspaces/yak_melodic_ws/src/yak/yak/include -isystem /usr/include/pcl-1.8 -isystem /usr/include/eigen3 -isystem /usr/local/include/pcl-1.9 -isystem /usr/include/ni -isystem /usr/include/openni2 -isystem /opt/ensenso/development/c/include -isystem /usr/local/include -isystem /usr/local/include/opencv -isystem /usr/local/cuda-10.1/targets/x86_64-linux/include -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -isystem /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++  -fPIC   -fPIC -std=gnu++14 -o CMakeFiles/yak_frontend.dir/src/kfusion/tsdf_container.cpp.o -c /home/mrtd/other_workspaces/yak_melodic_ws/src/yak/yak/src/kfusion/tsdf_container.cpp
<command-line>:0:1: error: macro names must be identifiers

Same subset when building against PCL 1.8.1 when using add_definitions(${PCL_DEFINITIONS}), which succeeds:

[ 75%] Building CXX object CMakeFiles/yak_frontend.dir/src/yak_server.cpp.o
/usr/bin/c++  -DDISABLE_DAVIDSDK -DDISABLE_DSSDK -DDISABLE_LIBUSB_1_0 -DDISABLE_PCAP -DDISABLE_PNG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DvtkFiltersFlowPaths_AUTOINIT="1(vtkFiltersParallelFlowPaths)" -DvtkIOExodus_AUTOINIT="1(vtkIOParallelExodus)" -DvtkIOGeometry_AUTOINIT="1(vtkIOMPIParallel)" -DvtkIOImage_AUTOINIT="1(vtkIOMPIImage)" -DvtkIOParallel_AUTOINIT="1(vtkIOMPIParallel)" -DvtkIOSQL_AUTOINIT="2(vtkIOMySQL,vtkIOPostgreSQL)" -DvtkRenderingContext2D_AUTOINIT="1(vtkRenderingContextOpenGL)" -DvtkRenderingCore_AUTOINIT="3(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingOpenGL)" -DvtkRenderingFreeType_AUTOINIT="2(vtkRenderingFreeTypeFontConfig,vtkRenderingMatplotlib)" -DvtkRenderingLIC_AUTOINIT="1(vtkRenderingParallelLIC)" -DvtkRenderingVolume_AUTOINIT="1(vtkRenderingVolumeOpenGL)" -Dyak_frontend_EXPORTS -isystem /usr/include/vtk-6.3 -isystem /usr/include/freetype2 -isystem /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -isystem /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/opal/mca/event/libevent2022/libevent -isystem /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/opal/mca/event/libevent2022/libevent/include -isystem /usr/lib/x86_64-linux-gnu/openmpi/include -isystem /usr/include/python2.7 -isystem /usr/include/x86_64-linux-gnu -isystem /usr/include/hdf5/openmpi -isystem /usr/include/libxml2 -isystem /usr/include/jsoncpp -isystem /usr/include/tcl -I/home/mrtd/other_workspaces/yak_melodic_ws/src/yak/yak/include -isystem /usr/include/pcl-1.8 -isystem /usr/include/eigen3 -isystem /usr/include/ni -isystem /usr/include/openni2 -isystem /opt/ensenso/development/c/include -isystem /usr/local/include -isystem /usr/local/include/opencv -isystem /usr/local/cuda-10.1/targets/x86_64-linux/include -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -isystem /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++  -fPIC     -fPIC -std=gnu++14 -o CMakeFiles/yak_frontend.dir/src/yak_server.cpp.o -c /home/mrtd/other_workspaces/yak_melodic_ws/src/yak/yak/src/yak_server.cpp
[ 80%] Building CXX object CMakeFiles/yak_frontend.dir/src/kfusion/tsdf_container.cpp.o
/usr/bin/c++  -DDISABLE_DAVIDSDK -DDISABLE_DSSDK -DDISABLE_LIBUSB_1_0 -DDISABLE_PCAP -DDISABLE_PNG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DvtkFiltersFlowPaths_AUTOINIT="1(vtkFiltersParallelFlowPaths)" -DvtkIOExodus_AUTOINIT="1(vtkIOParallelExodus)" -DvtkIOGeometry_AUTOINIT="1(vtkIOMPIParallel)" -DvtkIOImage_AUTOINIT="1(vtkIOMPIImage)" -DvtkIOParallel_AUTOINIT="1(vtkIOMPIParallel)" -DvtkIOSQL_AUTOINIT="2(vtkIOMySQL,vtkIOPostgreSQL)" -DvtkRenderingContext2D_AUTOINIT="1(vtkRenderingContextOpenGL)" -DvtkRenderingCore_AUTOINIT="3(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingOpenGL)" -DvtkRenderingFreeType_AUTOINIT="2(vtkRenderingFreeTypeFontConfig,vtkRenderingMatplotlib)" -DvtkRenderingLIC_AUTOINIT="1(vtkRenderingParallelLIC)" -DvtkRenderingVolume_AUTOINIT="1(vtkRenderingVolumeOpenGL)" -Dyak_frontend_EXPORTS -isystem /usr/include/vtk-6.3 -isystem /usr/include/freetype2 -isystem /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -isystem /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/opal/mca/event/libevent2022/libevent -isystem /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/opal/mca/event/libevent2022/libevent/include -isystem /usr/lib/x86_64-linux-gnu/openmpi/include -isystem /usr/include/python2.7 -isystem /usr/include/x86_64-linux-gnu -isystem /usr/include/hdf5/openmpi -isystem /usr/include/libxml2 -isystem /usr/include/jsoncpp -isystem /usr/include/tcl -I/home/mrtd/other_workspaces/yak_melodic_ws/src/yak/yak/include -isystem /usr/include/pcl-1.8 -isystem /usr/include/eigen3 -isystem /usr/include/ni -isystem /usr/include/openni2 -isystem /opt/ensenso/development/c/include -isystem /usr/local/include -isystem /usr/local/include/opencv -isystem /usr/local/cuda-10.1/targets/x86_64-linux/include -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -isystem /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++  -fPIC     -fPIC -std=gnu++14 -o CMakeFiles/yak_frontend.dir/src/kfusion/tsdf_container.cpp.o -c /home/mrtd/other_workspaces/yak_melodic_ws/src/yak/yak/src/kfusion/tsdf_container.cpp

It looks like this has been fixed in PCL 1.9.1, since it builds fine with target_compile_options. According to this PR it isn't necessary to use ${PCL_DEFINITIONS} in more recent versions of PCL, and that only ${PCL_LIBRARIES} is necessary.

FusionServer hangs when calling resetWithNewParams

This was happening yesterday, but it does not appear to be happening this morning. Intermittently, it would hang when calling resetWithNewParams several times in a row. Debugging it, it looked like it was getting stuck at cudaFreeHost (). Based on this, I am thinking this may pop up again when my GPU memory gets in the the right state again.

Here is the full backtrace from where it got stuckbacktrace.txt

Convert to use OpenCL instead of CUDA

Has any thought been put into this? I have no experience with OpenCL but from what I know it would have several advantages primarily allowing yak to run on multiple brands of GPU as well as at least Intel CPUs.

I know I have read that it may not perform as well as NVIDIA specific code for some problems but allowing us to build yak to run on the CPU seems worth a small performance hit. If we ran it on a CPU we could presumably then use regular RAM for the volume. This would also allow us to unit test on Travis easily

yak with kinect v2

Hi,

Sounds great work.
Could you confirm or comment whether this package can subscribe to topics from and rgbd camera and build models? and How?

Many thanks
aamir

Add Docker images to ros_industrial/docker

Currently the Docker images used for CI are defined by Dockerfiles within the yak repo and hosted on my personal Docker Hub repo, which isn't a good long-term situation. It would be better to add the Dockerfiles to the ros_industrial/docker repo and host the images on the ROS-Industrial Docker Hub.

The Dockerfiles need to meet the following requirements (the existing ones should serve as sufficient examples):

  • Represent the different supported OS distributions. Currently Ubuntu Xenial and Bionic, and will include Focal once #42 is resolved.
  • For each distro, provide a separate image for each supported CUDA version. Currently this is CUDA 9.2 and 10.2. Right now this is done by basing the image off a Nvidia CUDA image (for example, using FROM nvidia/cuda:10.2-cudnn7-devel-ubuntu18.04).
  • The Xenial images need to include PCL 1.8 built from source. The Canonical-provided PCL package is PCL 1.7 and Yak does not build correctly with this version. I think the process of building PCL from source takes too long for the image to be build on Docker Hub, so I've been building the affected images locally and pushing them up.
  • Each image needs to have the appropriate ROS1 version for that distro, since the Industrial CI pipeline uses ROS and the downstream yak_ros package needs ROS anyway.

TSDF integration doesn't happen when using CMake first-class CUDA language support

The switch away from the older FindCUDA module (e.g. cuda_add_library(), etc.) to CMake's newer CUDA first-class language support apparently introduced an issue where Yak builds without errors and runs without crashing but doesn't integrate depth images into the TSDF volume.

Short-term fix: revert back to the FindCUDA module.

Long-term fix: figure out what's going wrong under the new method.

Remove tsdf_min_camera_movement

This seems like a detail in the data capture not the reconstruction. In other words, I think this should be in yak_ros not yak itself. In fact, it is in both places now. I propose we remove it from yak (in kinfu.cpp) and let the data collection wrapper handle it (yak_ros).

Repositories on which this project is based on

Thanks a lot.

I did not find any link or info about the repositories on which this project is based or where code was taken from.

I would like to know if this project is based or if has been using code from:

Could you list any other projects that yak is based on?

Thanks

PS: I was able to run the demo of https://github.com/ros-industrial/yak_ros2/actions in ROS Foxy.

Assertion failed if volume_x dimension is not a multiple of 32

For our application, I want to place the tdsf volume above a table of 1200x2000 mm. However, an assertion failed when I used volume_x = 2000. Upon closer inspection, this occurs if volume_x is not a multiple of 32 (kinfu.cpp:52). Is there a reason this assertion is in place?

The complete error message:
OpenCV Error: Assertion failed (params.volume_dims[0] % 32 == 0) in KinFu, file /home/dave992/workspaces/teriyaki_ws/src/yak/yak/src/kfusion/kinfu.cpp, line 52 terminate called after throwing an instance of 'cv::Exception'

Use a sparse data structure for the voxel volume

Right now Yak uses a simple dense voxel volume representation. Other TSDF implementations use octrees or voxel hashing approaches to more efficiently store occupied voxels. Advantages include better memory efficiency and fewer constraints on the size and shape of the surface to be reconstructed.

-fPIC compile error

On my system, I ran into the following error when compiling:

/usr/bin/ld: libyak.a(device_memory.cpp.o): relocation R_X86_64_PC32 against symbol `_ZN7kfusion4cuda5errorEPKcS2_iS2_' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value

I'm not sure what caused this, as I've successfully compiled the library in the past. Perhaps a new version of CMake or other libraries involved changed something?

Anyway, going through the generated CMake files I saw that the -fPIC flag was only added during the compiling of the .cu CUDA files and not for the regular .cpp files while creating the libyak library which in turn caused the error shown above.

Scaling Factor Between Depth Image and Real Distance

Hi,

Sorry I'm new to this and it might be a trivial question... I wonder if Yak expects the scaling factor between depth image pixel value and real depth (seems not)? I'm unable to think of how it fuses the TSDF volume, which is in world units, using depth images without knowing the conversion factor since every point on that ray has been projected to the same pixel Is there anything I've missed?

Thanks

Add additional data fields to TSDF voxels

It would be useful to represent additional channels such as color/intensity and semantic classification.

Currently each voxel contains 32 bits of data: a 16-bit half-float representing the distance to the isosurface, and a 16-bit unsigned short representing the weight, i.e. how many times that voxel has been updated.

Apply distortion correction when integrating depth images

Currently only the camera intrinsic parameters (fx, fy, cx, cy) are used, which implicitly requires that incoming depth images already be rectified. It would be a useful enhancement to also apply distortion correction using the plumb bob model.

What's the mean of world_to_camera?

Thanks for your nice work!
I wonder the meaning of world_to_camera.
To put it bluntly, whether world_to_camera transform a point in camera frame to world frame, or vice versa.

If world_to_camera means transform a point in camera frame to world frame, then the motion formula may be:
Eigen::Affine3f motion = last_camera_pose_.inverse() * current_camera_in_volume;

Enable integration of unstructured 3D data

This would allow the use of sensors like LIDARs and laser profilometers.

I think the only required assumption would be that there is clear line-of-sight between the sensor origin and each point in the cloud. On the other hand, I'm also not sure how moving away from always having an X-px by Y-px image would affect the CUDA potion of this package.

nvcc fatal : Unsupported gpu architecture 'compute_20'

Originally posted by @yyxr75 in ros-industrial/yak_ros#19 (comment)

It looks like you're not building Yak, which is the underlying TSDF library that yak_ros uses. You will need to clone Yak into your workspace and install its dependencies before you can build yak_ros. It has a separate set of installation instructions, which can be found here.

Thank you a lot,
I tried to build and install 'yak' the project
I build it on CUDA 9.0 but error shows:

[ 5%] Building NVCC (Device) object CMakeFiles/yak.dir/src/cuda/yak_generated_tsdf_volume.cu.o
nvcc fatal : Unsupported gpu architecture 'compute_20'
CMake Error at yak_generated_tsdf_volume.cu.o.cmake:220 (message):
Error generating
/home/yang/catkin_ws/src/yak/build/CMakeFiles/yak.dir/src/cuda/./yak_generated_tsdf_volume.cu

It seems I need to comment some config in some files
I was mostly told by the blog from webs that I should comment something in Makefile.config
but I can't find this file.

Melodic build gets cuda error about only supports gcc < 6

Add cuda options OPTIONS --compiler-bindir /usr/bin/gcc-6 below to get it no build without changing your host gcc version.

cuda_add_library(${PROJECT_NAME}
  src/kfusion/core.cpp
  src/kfusion/device_memory.cpp
  src/kfusion/imgproc.cpp
  src/kfusion/kinfu.cpp
  src/kfusion/precomp.cpp
  src/kfusion/projective_icp.cpp
  src/kfusion/tsdf_volume.cpp
  src/cuda/imgproc.cu
  src/cuda/proj_icp.cu
  src/cuda/tsdf_volume.cu
  OPTIONS --compiler-bindir /usr/bin/gcc-6
)

Calculate code coverage metrics during CI

Right now Yak has a code coverage metric of zero percent (profoundly shameful!). I think that seeing a reminder of that for every PR would be a good incentive to make that number something other than zero.

Tesseract added Codecov integration recently, and I like the reports it generates (an example here). Since Yak is an open-source package Codecov is probably a good option here as well.

TSDF for outdoor large scale maps

Hello,
This is a question and not a bug report, so please close if unrelated. I am intending to build large scale outdoor maps and represent them in TSDF by using this repo. I am wondering about the applicability of this. Is there any memory concerns, have anyone tried to do something similar ? , or any suggestions to et started with it ?
Thank you

Backwards compatibility with CUDA 8

Motivated by issues like #25. People have older GPUs that are only compatible with older Nvidia drivers, and it would be good if they weren't left behind.

TODO: Link what we needed to change during the original switch from CUDA 8 to CUDA 9, and decide if it's possible to make changes to support both versions (as well as CUDA 10).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.