Giter Club home page Giter Club logo

cupoch's Introduction

Robotics with GPU computing

Build status Build statusPyPI version PyPI - Python Version Downloads xscode

Buy Me A Coffee

Cupoch is a library that implements rapid 3D data processing for robotics using CUDA.

The goal of this library is to implement fast 3D data computation in robot systems. For example, it has applications in SLAM, collision avoidance, path planning and tracking. This repository is based on Open3D.

Core Features

Installation

This library is packaged under 64 Bit Ubuntu Linux 20.04 and CUDA 11.7. You can install cupoch using pip.

pip install cupoch

Or install cupoch from source.

git clone https://github.com/neka-nat/cupoch.git --recurse
cd cupoch
mkdir build
cd build
cmake ..; make install-pip-package -j

Installation for Jetson Nano

You can also install cupoch using pip on Jetson Nano. Please set up Jetson using jetpack and install some packages with apt.

sudo apt-get install xorg-dev libxinerama-dev libxcursor-dev libglu1-mesa-dev
pip3 install cupoch

Or you can compile it from source. Update your version of cmake if necessary.

wget https://github.com/Kitware/CMake/releases/download/v3.18.4/cmake-3.18.4.tar.gz
tar zxvf cmake-3.18.4.tar.gz
cd cmake-3.18.4
./bootstrap -- -DCMAKE_USE_OPENSSL=OFF
make && sudo make install
cd ..
git clone -b jetson_nano https://github.com/neka-nat/cupoch.git --recurse
cd cupoch/
mkdir build
cd build/
export PATH=/usr/local/cuda/bin:$PATH
cmake -DBUILD_GLEW=ON -DBUILD_GLFW=ON -DBUILD_PNG=ON -DBUILD_JSONCPP=ON ..
sudo make install-pip-package

Use Docker

docker-compose up -d
# xhost +
docker exec -it cupoch bash

Getting Started

Please see how to use cupoch in Getting Started first.

Results

The figure shows Cupoch's point cloud algorithms speedup over Open3D. The environment tested on has the following specs:

  • Intel Core i7-7700HQ CPU
  • Nvidia GTX1070 GPU
  • OMP_NUM_THREAD=1

You can get the result by running the example script in your environment.

cd examples/python/basic
python benchmarks.py

If you get the following error when executing an example that includes 3D drawing, please start the program as follows.

$ cd examples/basic
$ python visualization.py
Load a ply point cloud, print it, and render it
MESA: warning: Driver does not support the 0xa7a0 PCI ID.
libGL error: failed to create dri screen
libGL error: failed to load driver: iris
MESA: warning: Driver does not support the 0xa7a0 PCI ID.
libGL error: failed to create dri screen
libGL error: failed to load driver: iris
Error: unknown error	phong_shader.cu:330
__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia python visualization.py

speedup

Visual odometry with intel realsense D435

vo

Occupancy grid with intel realsense D435

og

Kinect fusion with intel realsense L515

kf

Stereo matching

sm

Fast Global Registration

fgr

Point cloud from laser scan

fgr

Collision detection for 2 voxel grids

col

Drone Path planning

dp

Visual odometry with ROS + D435

This demo works in the following environment.

  • ROS melodic
  • Python2.7
# Launch roscore and rviz in the other terminals.
cd examples/python/ros
python realsense_rgbd_odometry_node.py

vo

Visualization

Point Cloud Triangle Mesh Kinematics
Voxel Grid Occupancy Grid Distance Transform
Graph Image

References

Citing

@misc{cupoch,
   author = {Kenta Tanaka},
   year = {2020},
   note = {https://github.com/neka-nat/cupoch},
   title = {cupoch -- Robotics with GPU computing}
}

cupoch's People

Contributors

eclipse0922 avatar friendship1 avatar jediofgever avatar neka-nat avatar trellixvulnteam avatar zhenshenglee 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cupoch's Issues

Use cupoch library independently

Hello, I want to compile Cupoch to generate the library on the windows system, but there is a memory manager allocation problem when calling it. Have you tried it on the window?

util_type.cuh line 891 issue

Hello,

I got cupoch compiling issue as shown on the following pic. I'm using

cupoch v0.1.8, VS2019, cuda 10.2

thank you!

image

Scalable tsdf integration: parallel_for failed: cudaErrorMemoryAllocation: out of memory

Hello,

I tried the ScalableTSDF integration and got this error:
terminate called after throwing an instance of 'thrust::system::system_error' what(): parallel_for failed: cudaErrorMemoryAllocation: out of memory Aborted (core dumped)

I thought it was a little bit strange because it took a lot more memory than UniformTSDF, which worked with about 4GB, and my graphics card has 8GB in total.

I've tried to play with the parameters like making the voxel size larger, but I always got the same error.

Below is the code I'm trying to run.

Thanks for your great work and any help you can offer.

#include "cupoch/cupoch.h"
#include "cupoch/integration/scalable_tsdfvolume.h"
#include "cupoch/integration/uniform_tsdfvolume.h"
#include "sys/time.h"

int main(int argc, char *argv[]) {
    using namespace cupoch;
    using namespace std;

    string datasetDir = "/home/apeiron/data/tum_clouds/";
    auto intrinsic = camera::PinholeCameraIntrinsic(
            640, 480, 517.306408, 516.469215, 318.643040, 255.313989);

    //-- read imgs
    geometry::Image depth, color;
    io::ReadImage("/home/apeiron/data/tum_clouds/depth/0.png", depth);
    io::ReadImage("/home/apeiron/data/tum_clouds/color/0.jpg", color);
    auto rgbd = geometry::RGBDImage::CreateFromColorAndDepth(
            color, depth, 5000.0, 2.0, false);

    //-- tsdf
    float length = 2;
    float resolution = 512;
    float sdf_trunc_percentage = 0.01;

    // uniform works
    // integration::UniformTSDFVolume volume(
    //         length, resolution, length * sdf_trunc_percentage,
    //         integration::TSDFVolumeColorType::RGB8);

    integration::ScalableTSDFVolume volume(
            length / resolution, length * sdf_trunc_percentage,
            integration::TSDFVolumeColorType::RGB8);

    Eigen::Matrix4f extrinsic = Eigen::Matrix4f::Identity();
    extrinsic(0, 3) = -0.5;
    extrinsic(1, 3) = -0.5;
    extrinsic(2, 3) = 0.5;
    volume.Integrate(*rgbd, intrinsic, extrinsic);

    auto mesh = volume.ExtractTriangleMesh();

    io::WriteTriangleMesh("test.ply", *mesh);
    visualization::DrawGeometries({mesh});
    return 0;
}

realsense_kinfuを実行する事が出来ません

はじめまして.
realsenseでkinectfusionを実行したいのですがubuntuにて実行した場合下記のようなエラーが出てしまいます.
何か対策案はありますでしょうか?
エラー文が何も出ないのでprintを用いて文章が表示されるのかという事を各行で行った際に84行目のコードが実行されないようです.
infu = cph.kinfu.Pipeline(intrinsic, cph.kinfu.KinfuParameters())

[環境]
・ubuntu18.04
・windows visual studio
・cuda-10

ubuntuのネイティブで実装した際には下記のエラーが発生してしまいました.

Traceback (most recent call last):
File "benchmarks.py", line 4, in
import cupoch as cph
File "/home/nvidia/.pyenv/versions/3.7.0/lib/python3.7/site-packages/cupoch/init.py", line 1, in
from .cupoch import * # py2 py3 compatible
ImportError: CUDA error at: /home/runner/work/cupoch/cupoch/third_party/rmm/include/rmm/mr/device/per_device_resource.hpp:134: cudaErrorNoDevice no CUDA-capable device is detected

Is it possible to use Open3D and Cupoch together?

Hello,

I tried to use Open3d and Cupoch together side-by-side for comparison. But got something redefined error. Here is my code

auto pcd_gpu = cupoch::io::CreatePointCloudFromFile("pcd1.pcd"); auto pcd = open3d::io::CreatePointCloudFromFile("pcd1.pcd");

Here is the error messages

image

Anyway to solve this issue?

Thank you!

Is Cupoch Windows MSVC GPU ready to work?

Hello,

I tried to test Cupoch on Windows 10.

  1. Build with VS2019 --> no problem.
  2. Test normal calculation with the same 18519 points PCD --> Open3D needs 10ms, Cupoch needs 52 ms

Here is the code

pcd->EstimateNormals(open3d::geometry::KDTreeSearchParamHybrid(radius_normal, MAX_NN));
pcd_gpu->EstimateNormals(cupoch::geometry::KDTreeSearchParamHybrid(radius_normal, MAX_NN));

I guess that the calculation was not run on GPU. But how to make sure it is run on GPU? I already had this line in my code

cupoch::utility::InitializeAllocator();

sample_points_uniformly function becomes slower in cupoch

I test sample_points_uniformly function in both open3d and cupoch. cupoch is slower than open3d. In which kind of situations gpu could make the calculation faster than cpu?

For 50000 points:

cupoch: 0.04s
open3d: 0.002s

For 5000000 points:

cupoch: 3.5s
open3d: 0.2s

In windows use cupoch lib

I want use cupoch library in windows,like open3d,#include <Open3D/Open3D.h>, but there is a problem when using cupoch in winndows, is it supported now?

Dose cupoch depend on ROS?

Hello,

When I tried cupoch, I got the following build error

D:\git\cupoch\install\include\cupoch\kinematics\kinematic_chain.h:23: error: C1083: Cannot open include file: 'urdf_parser/urdf_parser.h': No such file or directory

Numpy conversion without going via. python list

Is there a way to convert a Vector3fVector to a numpy array without going via. a python list? This is much too slow for a large point cloud or image to be usable..

From the example on conversions:

print("---- To list of 1D np.array")
print(pcd.points.cpu())
print("---- To 2D np.array")
print(np.asarray(pcd.points.cpu()))

PointCloud loads slower for GPU than CPU

First, I wanted to say this is a great library!

During testing, I've noticed the following:

read_point_cloud (CPU) [sec]: 0.048947811126708984
PointCloud with 196133 points.
read_point_cloud (GPU) [sec]: 0.594552755355835
geometry::PointCloud with 196133 points.
transform (CPU) [sec]: 0.0018947124481201172
transform (GPU) [sec]: 0.0005991458892822266
estimate_normals (CPU) [sec]: 0.8370163440704346
estimate_normals (GPU) [sec]: 0.13143420219421387
voxel_down_sample (CPU) [sec]: 0.08861064910888672
voxel_down_sample (GPU) [sec]: 0.0065348148345947266
remove_radius_outlier (CPU) [sec]: 7.660656690597534
remove_radius_outlier (GPU) [sec]: 0.05325913429260254
remove_statistical_outlier (CPU) [sec]: 0.6584312915802002
remove_statistical_outlier (GPU) [sec]: 0.07167720794677734
registration_icp (CPU) [sec]: 10.772068977355957
registration_icp (GPU) [sec]: 0.10024285316467285
cluster_dbscan (CPU) [sec]: 1.0398595333099365
cluster_dbscan (GPU) [sec]: 0.3085062503814697

It seems the read_point_cloud functionality, is 1 order of magnitude larger for GPU, which seems to effectively bottleneck some of the value of the GPU efficiencies derived from things like FastGlobalRegistration, which is markedly faster than ICP. Does this mean that cupoch will always perform slower on FastGlobalRegistration a compared to ICP just from the overhead of I/O to VRAM?

I also tested this in a series of load and FastGlobalRegistration iterations, with the following result: 75% of the time was spend loading and unloading to VRAM, while 25% of the time was actually on FastGlobalRegistration.

This is being tested on a GTX Titan 6GB, which is listed here: https://www.geforce.com/hardware/desktop-gpus/geforce-gtx-titan/specifications

Raycasting

Hi,
Thanks so much for your work.
Do you have any plan implementing the ray casting algorithm to get a depth map / point cloud from the TSDF volume for a given camera pose?

Best regards

install on Jetson Xavier Agx

Great project !
I would like to test it on a Xavier Agx .. I was able to install cupoch but I can't use Jetcard..
then, when I try your examples, I have no error but I don't get any output...
What can I do ?

Performance optimization on RTX3060

I saw you test this project on GTX1070 and cuda10.1. My current environment is RTX3060 and CUDA11.0. Is there room for optimization in the registration module, such as parameter modification and full utilization of GPU, thank you!

cph.registration.registration_fast_based_on_feature_matching exits without error message

Console prints out:
:: Downsample with a voxel size 0.020.
:: Estimate normal with search radius 0.040.
:: Compute FPFH feature with search radius 0.100.
:: Downsample with a voxel size 0.020.
:: Estimate normal with search radius 0.040.
:: Compute FPFH feature with search radius 0.100.
:: Apply fast global registration with distance threshold 0.010

Process finished with exit code -1

Compile failed on RTX3060

I compile cupoch on RTX3060 ,cuda11.0,win10,vs2019,cmake3.20.0,but compile failed.The error is as follows :
calling a host function("__roundf") from a device function("thrust::cuda_cub::__transform::unary_transform_f< ::thrust::detail::normal_iterator< ::thrust::device_ptr > , ::thrust::detail::normal_iterator< ::thrust::device_ptr > , ::thrust::cuda_cub::__transform::no_stencil_tag, ::, ::thrust::cuda_cub::__transform::always_true_predicate> ::operator () ") is not allowed cupoch_geometry C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0\include\thrust\system\cuda\detail\transform.h 119

identifier "__roundf" is undefined in device code cupoch_geometry C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0\include\thrust\system\cuda\detail\transform.h 119

“........\src\cupoch\geometry\trianglemesh.cu;........\src\cupoch\geometry\trianglemesh_factory.cu;........\src\cupoch\geometry\voxelgrid.cu;........\src\cupoch\geometry\voxelgrid_factory.cu”的自定义生成已退出,代码为 1。 cupoch_geometry C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets 240

I have tried for a long time and I don't know how to solve it. Thank you for your reply!

Any cpp example for FastGlobalRegistration and FRFH?

Hello

On the line 55 of the file
https://github.com/neka-nat/cupoch/blob/master/src/cupoch/registration/feature.h
you have an integer 33.

In this case if I calculate the feature, maybe I need to do the following?

`

std::tuple<std::shared_ptrcupoch::geometry::PointCloud, std::shared_ptr<cupoch::registration::Feature<33> > >
cphDownsamplingNormalFPFH(std::shared_ptrcupoch::geometry::PointCloud cloud_ptr, float voxel_size)
{
auto cloud_down = cloud_ptr->VoxelDownSample(voxel_size);

auto radius_normal = voxel_size * 2.0f;
int MAX_NN = 220;
cloud_down->EstimateNormals(
    cupoch::geometry::KDTreeSearchParamRadius(radius_normal, MAX_NN));

auto radius_feature = voxel_size * 5;
int MAX_NN_freature = 2 * MAX_NN;
auto cloud_fpfh = cupoch::registration::ComputeFPFHFeature(
    *cloud_down, cupoch::geometry::KDTreeSearchParamRadius(radius_feature, MAX_NN_freature));

return std::make_tuple(cloud_down, cloud_fpfh);

}

`

Am I right?

Thank you!

Thirdparty

Hello.

I decided to use cupoch in our project, since we needed to couple it with vcpkg. First idea was just to compile it seperatly.
But since cupoch have it's own dependencies it's conflicted with same dependecies in the vcpkg also in some cases like flann cupoch use minimal edited version.

So we decieded to start to change the build system of cupoch and make it possible to integrate it in the vcpkg.
I will be happy to share it here and improve it, currently it's not perfectly implemented but it's work for us.

points_from_dlpack: cudaErrorIllegalAddress

import torch
import cupoch as cph
from torch.utils.dlpack import to_dlpack
pcd = cph.geometry.PointCloud()
# this doesn't have a problem x = to_dlpack(torch.ones(10000000, 3).cuda())
# cupoch expects a cuda memory and dlpack can allow cpu memory? 
x = to_dlpack(torch.ones(10000000, 3))
pcd.from_points_dlpack(x)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
RuntimeError: transform: failed to synchronize: cudaErrorIllegalAddress: an illegal memory access was encountered

torch 1.7, cuda 11.1, github cupoch (latest master)

Use the C++ cupoch package directly

Dear @neka-nat,

My main question is: I was wondering if it is possible to use the cupoch c++ library directly in my own projects? If so, how do I structure my Cmakelists.txt and what do i link to where?


WHAT I TRIED:
Installing:

git clone https://github.com/neka-nat/cupoch.git --recurse
cd cupoch
mkdir build
cd build
cmake ..; make install-pip-package -j

but I was hoping i could also add the command:

sudo make install

to place it in my usr/.... to make it findable for my own package.

Using:
I tried importing the cupoch package in my Cmakelists.txt as:

find_package(fmt REQUIRED)
find_package(cupoch REQUIRED)
add_executable(
        my_prog
        src/program.cpp
        )

install(TARGETS my_prog DESTINATION lib/${PROJECT_NAME})

target_link_libraries(my_prog cupoch_geometry cupoch_utility cupoch_visualization cupoch_io fmt::fmt)
ament_target_dependencies(my_prog Ceres CUDA)

Yet this doesnt work as it cannot find cupoch.

CMake Error at CMakeLists.txt:26 (find_package):
  By not providing "Findcupoch.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "cupoch", but
  CMake did not find one.

  Could not find a package configuration file provided by "cupoch" with any
  of the following names:

    cupochConfig.cmake
    cupoch-config.cmake

  Add the installation prefix of "cupoch" to CMAKE_PREFIX_PATH or set
  "cupoch_DIR" to a directory containing one of the above files.  If "cupoch"
  provides a separate development package or SDK, be sure it has been
  installed.

if i simply comment the find_package(cupoch REQUIRED) command, then it fails to find the fmt and flann libraries:

[ 14%] Linking CXX executable my_prog
/usr/bin/ld: /usr/local/lib/libcupoch_geometry.a(cupoch_geometry_generated_boundingvolume.cu.o): in function `void fmt::v6::internal::basic_writer<fmt::v6::buffer_range<char> >::write_fp<float, true>(float, fmt::v6::basic_format_specs<char> const&)':
/home/shipborn/Documents/dashing/main/ros2/src/external/cupoch/third_party/fmt/include/fmt/format.h:2855: undefined reference to `bool fmt::v6::internal::grisu_format<double, 0>(double, fmt::v6::internal::buffer<char>&, int, unsigned int, int&)'
/usr/bin/ld: /usr/local/lib/libcupoch_geometry.a(cupoch_geometry_generated_boundingvolume.cu.o): in function `void fmt::v6::internal::basic_writer<fmt::v6::buffer_range<char> >::write_fp<double, true>(double, fmt::v6::basic_format_specs<char> const&)':
/home/shipborn/Documents/dashing/main/ros2/src/external/cupoch/third_party/fmt/include/fmt/format.h:2855: undefined reference to `bool fmt::v6::internal::grisu_format<double, 0>(double, fmt::v6::internal::buffer<char>&, int, unsigned int, int&)'
/usr/bin/ld: /usr/local/lib/libcupoch_geometry.a(cupoch_geometry_generated_kdtree_flann.cu.o): in function `flann::KDTreeCuda3dIndex<flann::L2<float> >::~KDTreeCuda3dIndex()':
/home/shipborn/Documents/dashing/main/ros2/src/external/cupoch/third_party/flann/algorithms/kdtree_cuda_3d_index.h:111: undefined reference to `flann::KDTreeCuda3dIndex<flann::L2<float> >::clearGpuBuffers()'
/usr/bin/ld: /usr/local/lib/libcupoch_geometry.a(cupoch_geometry_generated_kdtree_flann.cu.o): in function `flann::KDTreeCuda3dIndex<flann::L2<float> >::buildIndex()':
/home/shipborn/Documents/dashing/main/ros2/src/external/cupoch/third_party/flann/algorithms/kdtree_cuda_3d_index.h:138: undefined reference to `flann::KDTreeCuda3dIndex<flann::L2<float> >::uploadTreeToGpu()'
/usr/bin/ld: /usr/local/lib/libcupoch_geometry.a(cupoch_geometry_generated_kdtree_flann.cu.o): in function `flann::KDTreeCuda3dIndex<flann::L2<float> >::knnSearch(flann::Matrix<float> const&, flann::Matrix<int>&, flann::Matrix<float>&, unsigned long, flann::SearchParams const&) const':
/home/shipborn/Documents/dashing/main/ros2/src/external/cupoch/third_party/flann/algorithms/kdtree_cuda_3d_index.h:184: undefined reference to `flann::KDTreeCuda3dIndex<flann::L2<float> >::knnSearchGpu(flann::Matrix<float> const&, flann::Matrix<int>&, flann::Matrix<float>&, unsigned long, flann::SearchParams const&) const'
/usr/bin/ld: /usr/local/lib/libcupoch_geometry.a(cupoch_geometry_generated_kdtree_flann.cu.o): in function `flann::KDTreeCuda3dIndex<flann::L2<float> >::radiusSearch(flann::Matrix<float> const&, flann::Matrix<int>&, flann::Matrix<float>&, float, flann::SearchParams const&) const':
/home/shipborn/Documents/dashing/main/ros2/src/external/cupoch/third_party/flann/algorithms/kdtree_cuda_3d_index.h:201: undefined reference to `flann::KDTreeCuda3dIndex<flann::L2<float> >::radiusSearchGpu(flann::Matrix<float> const&, flann::Matrix<int>&, flann::Matrix<float>&, float, flann::SearchParams const&) const'
collect2: error: ld returned 1 exit status
make[3]: *** [CMakeFiles/my_prog.dir/build.make:302: my_prog] Error 1
make[2]: *** [CMakeFiles/Makefile2:152: CMakeFiles/my_prog.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:159: CMakeFiles/my_prog.dir/rule] Error 2
make: *** [Makefile:221: my_prog] Error 2

Greetings and thank you for your time.

version `GLIBC_2.29' not found

Currently trying to test this library out in google colab, however I am running into an issue where something seems to be looking for libm.se.6 version BLIBC_2.29.

Running ldd --version shows me the google colab server is running 2.27:
ldd (Ubuntu GLIBC 2.27-3ubuntu1) 2.27

From what i can see 2.27 is standard for ubuntu 18.04 . for this library it is stated that ubuntu 18.04 is supported

Supported platforms
Ubuntu 18.04

Why does it not work with GLIBC 2.27 ?

/usr/local/lib/python3.6/dist-packages/cupoch/__init__.py in <module>()
----> 1 from .cupoch import * # py2 py3 compatible
      2 initialize_allocator()
      3 
      4 __version__ = '0.1.3.0'

ImportError: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /usr/local/lib/python3.6/dist-packages/cupoch/cupoch.cpython-36m-x86_64-linux-gnu.so)

Pip cannot find cupoch

Hello,

I tried to install using pip

pip install cupoch

But I got these error messages

ERROR: Could not find a version that satisfies the requirement cupoch
ERROR: No matching distribution found for cupoch

Anyway to solve this issue? Is it because I am using windows? @neka-nat

Thank you!

EDIT:
It works when I am not in a conda environment, however it fails when an environment is activated. Can someone help me?

Question about collision detection

Hi, Thanks a lot for your amazing work. Could I ask, did you test the collision checking part?
Currently I wanna test the collision detection given two point clouds or meshes and corresponding translation matrixes. If you have the test code for it, that will be helpful. Thanks again. ;)

Best regard,
lei

globaloptimization use cuda

When the posegraph is relatively large, using globaloptimization will be slower, so can globaloptimization be accelerated by cuda?

Extracting point cloud from TSDF by frustum

Hello @neka-nat ,

Thank you for the great job you are doing with this project.

As I can observe from the code at current stage there is only full point cloud extraction possible from TSDF.
Are there any plans adding partial extraction by basic geometry figures such as frustum sphere or cube?

Thanks in advance.

Direct zero-copy from cupy array

I failed to find in the documentation or anywhere in the code comments a way of directly using cupy arrays that I already have loaded on the device?

Right now I am running custom kernels using numba and cupy and it's working like a charm. However when I use cupoch I first need to copy to host and then copy it back to the device using cupoch. This currently takes 30ms on an algorithm that takes a total of 60ms.... so 50% is lost on wasted copying.

Right now I have this workflow
cloud = cupy.asarray(source_data)
*Custom calculations*
cloud_host = cupy.asnumpy(cloud)
gpu = cph.geometry.PointCloud()
gpu.points = cph.utility.Vector3fVector(cloud_host)
*cupoch calculations*

Im sure there is a faster way :)

Out of memory while performing cph.registration.registration_filterreg

Hello,

I am using cph.registration.registration_filterreg for registering various pointcloud iteratively. The memory keeps growing after each iteration and after about 280 iterations i get CUDA out of memory error.

Environment:

  • Windows 10
  • Python 3.7.9
  • Intel Core i7-9700k
  • NVIDIA GeForce GTX 1660, 6GB

Is there anything that can be done apart from executing this on a linux environment?
cupoch_issue

Visual Studio 2019 and Cuda 10.2 compile error

Hi,
First of all, thanks for your amazing work. I have got several isues whne compile the project with visual studio. My setup is:

  • Visual studio 2019
  • Cuda 10.2
  • Graphic card rtx 2060

In cupoch_registration my compliation error is:

**- Error calling a host function("isinf ") from a device function("thrust::cuda_cub::cub::AgentReduce< ::thrust::cuda_cub::cub::AgentReducePolicy<(int)256, (int)20, (int)2, ( ::thrust::cuda_cub::cub::BlockReduceAlgorithm)2, ( ::thrust::cuda_cub::cub::CacheLoadModifier)0> , ::thrust::cuda_cub::transform_input_iterator_t<float, ::thrust::counting_iterator<int, ::thrust::use_default, ::thrust::use_default, ::thrust::use_default> , ::_NV_ANON_NAMESPACE::extact_knn_distance_functor> , float *, int, ::thrust::plus > ::ConsumeTile<(int)1, (int)0> ") is not allowed cupoch_registration C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\include\thrust\iterator\iterator_facade.h 171

  • Error identifier "isinf " is undefined in device code cupoch_registration C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\include\thrust\iterator\iterator_facade.h 171

  • Error calling a host function("isinf ") from a device function("thrust::cuda_cub::cub::AgentReduce< ::thrust::cuda_cub::cub::AgentReducePolicy<(int)256, (int)20, (int)2, ( ::thrust::cuda_cub::cub::BlockReduceAlgorithm)2, ( ::thrust::cuda_cub::cub::CacheLoadModifier)0> , ::thrust::cuda_cub::transform_input_iterator_t<float, ::thrust::counting_iterator<int, ::thrust::use_default, ::thrust::use_default, ::thrust::use_default> , ::_NV_ANON_NAMESPACE::extact_knn_distance_functor> , float *, int, ::thrust::plus > ::ConsumeTile<(int)1, (int)0> ") is not allowed cupoch_registration C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\include\thrust\iterator\iterator_facade.h 171

  • Error identifier "isinf " is undefined in device code cupoch_registration C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\include\thrust\iterator\iterator_facade.h 171

  • Error calling a host function("isinf ") from a device function("thrust::cuda_cub::cub::AgentReduce< ::thrust::cuda_cub::cub::AgentReducePolicy<(int)256, (int)20, (int)2, ( ::thrust::cuda_cub::cub::BlockReduceAlgorithm)2, ( ::thrust::cuda_cub::cub::CacheLoadModifier)0> , ::thrust::cuda_cub::transform_input_iterator_t<float, ::thrust::counting_iterator<int, ::thrust::use_default, ::thrust::use_default, ::thrust::use_default> , ::_NV_ANON_NAMESPACE::extact_knn_distance_functor> , float *, int, ::thrust::plus > ::ConsumeTile<(int)0, (int)0> ") is not allowed cupoch_registration C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\include\thrust\iterator\iterator_facade.h 171

  • Error identifier "isinf " is undefined in device code cupoch_registration C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\include\thrust\iterator\iterator_facade.h 171

  • Error calling a host function("isinf ") from a device function("thrust::cuda_cub::cub::AgentReduce< ::thrust::cuda_cub::cub::AgentReducePolicy<(int)256, (int)20, (int)2, ( ::thrust::cuda_cub::cub::BlockReduceAlgorithm)2, ( ::thrust::cuda_cub::cub::CacheLoadModifier)0> , ::thrust::cuda_cub::transform_input_iterator_t<float, ::thrust::counting_iterator<int, ::thrust::use_default, ::thrust::use_default, ::thrust::use_default> , ::_NV_ANON_NAMESPACE::extact_knn_distance_functor> , float *, int, ::thrust::plus > ::ConsumeTile<(int)0, (int)0> ") is not allowed cupoch_registration C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\include\thrust\iterator\iterator_facade.h 171

  • Error identifier "isinf " is undefined in device code cupoch_registration C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\include\thrust\iterator\iterator_facade.h 171

  • Error calling a host function("isinf ") from a device function("thrust::cuda_cub::cub::LoadDirectStriped<(int)256, float, (int)20, ::thrust::cuda_cub::transform_input_iterator_t<float, ::thrust::counting_iterator<int, ::thrust::use_default, ::thrust::use_default, ::thrust::use_default> , ::_NV_ANON_NAMESPACE::extact_knn_distance_functor> > ") is not allowed cupoch_registration C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\include\thrust\iterator\iterator_facade.h 171

  • Error identifier "isinf " is undefined in device code cupoch_registration C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\include\thrust\iterator\iterator_facade.h 171**

on the other hand at cupoch_utility i have other compile error:

**- Error asm operand type size(8) does not match type/size implied by constraint 'r' cupoch_utility E:\wavelet\cupoch\third_party\eigen\Eigen\src\Core\GenericPacketMath.h 429

  • Error asm operand type size(8) does not match type/size implied by constraint 'r' cupoch_utility E:\wavelet\cupoch\third_party\eigen\Eigen\src\Core\GenericPacketMath.h 429**

how can i solve this errors? Thanks for all ;)

When will windows be supported?

Hi everyone,

I am so greatly to hear that the libray was able to process 3D point cloud data using CUDA. Furthermore, cupoch is based on the functionality of Open3D.

From this issue: https://github.com/neka-nat/cupoch/issues/3, I know that the libray didn't support either MINGW or MSVC on windows.

However, my app developed with MSVC and ran on windows. Up to now, I use Open3D to implement my requirements on CPU yet. I'm very anxious to speed up my app by running on GPU.

When will windows be supported?

RGBD Integration: No volume visualized (Cupoc Error)

I am trying to run the script rgbd_integration in examples\python\advanced.
But when the geometry is visualized, I only see a window with a black screen, and in the console I find the following errors:

[Cupoc ERROR] [CreateCoordinateFrame] size <= 0
[Cupoc ERROR] [CreateSphere] radius <= 0
[Cupoc ERROR] [CreateArrow] cylinder_radius <= 0
[Cupoc ERROR] [CreateArrow] cone_radius <= 0
[Cupoc ERROR] [CreateArrow] cylinder_height <= 0
[Cupoc ERROR] [CreateArrow] cone_height <= 0
[Cupoc ERROR] [CreateCylinder] radius <= 0
[Cupoc ERROR] [CreateCylinder] height <= 0
[Cupoc ERROR] [CreateCone] radius <= 0
[Cupoc ERROR] [CreateCone] height <= 0
[Cupoc ERROR] [CreateArrow] cylinder_radius <= 0
[Cupoc ERROR] [CreateArrow] cone_radius <= 0
[Cupoc ERROR] [CreateArrow] cylinder_height <= 0
[Cupoc ERROR] [CreateArrow] cone_height <= 0
[Cupoc ERROR] [CreateCylinder] radius <= 0
[Cupoc ERROR] [CreateCylinder] height <= 0
[Cupoc ERROR] [CreateCone] radius <= 0
[Cupoc ERROR] [CreateCone] height <= 0
[Cupoc ERROR] [CreateArrow] cylinder_radius <= 0
[Cupoc ERROR] [CreateArrow] cone_radius <= 0
[Cupoc ERROR] [CreateArrow] cylinder_height <= 0
[Cupoc ERROR] [CreateArrow] cone_height <= 0
[Cupoc ERROR] [CreateCylinder] radius <= 0
[Cupoc ERROR] [CreateCylinder] height <= 0
[Cupoc ERROR] [CreateCone] radius <= 0
[Cupoc ERROR] [CreateCone] height <= 0

Tested on two Windows 10 machines with CUDA 11.1 installed (Python 3.8).

cluster_dbscan over voxel_down_sample function becomes slower in cupoch

I test cluster_dbscan and voxel_down_sample functions in both open3d and cupoch. I apply cluster_dbscan in the resulting point cloud from voxel_down_sample and cupoch is slower than open3d.

I've the following processing times:

For 196133 points:

geometry::PointCloud with 196133 points.
transform (CPU) [sec]: 0.0009989738464355469
transform (GPU) [sec]: 0.0009970664978027344
voxel_down_sample (CPU) [sec]: 0.011995553970336914
voxel_down_sample (GPU) [sec]: 0.01075434684753418
cluster_dbscan (CPU) [sec]: 0.05086064338684082
cluster_dbscan (GPU) [sec]: 0.16341233253479004

For 1440 points:

geometry::PointCloud with 1440 points.
transform (CPU) [sec]: 0.0
transform (GPU) [sec]: 0.0
voxel_down_sample (CPU) [sec]: 0.0
voxel_down_sample (GPU) [sec]: 0.001996755599975586
cluster_dbscan (CPU) [sec]: 0.002991914749145508
cluster_dbscan (GPU) [sec]: 0.9901258945465088

Is there anyway gpu could make the calculation faster than cpu?

Is there anyway to do multiple ICPs at once.

Hello @neka-nat,

This is an incredible project. Thank you so much! I have a quesiton:

I have N pairs of point clouds and I have to do ICP between each pair. I have 2 GPUs and I'm not sure if there is any good way of running simultaneous registration. I tried using python multprocessing but it actually slows it down by 3x rather than speeding it up. Any thoughts are welcome!

Building from source error with CUDA & eigen3

Hello @neka-nat,

A huge thanks for Cupoch

But im facing issue while building from source

system config

Nvidia geforce 1650
cuda toolkit 10.2
ubuntu 19.10
inbuilt Eigen : eigen 3.3.7

I tried with both eigen3 3rdparty and inbuilt version using
cmake -DBUILD_EIGEN3=OFF
and
cmake -DBUILD_EIGEN3=ON

the make make install-pip-package -j is getting killed

few error snippets are

/home/shankar/3D projects/cupoch/cupoch/src/cupoch/geometry/boundingvolume.cu(26): error: identifier "Eigen::MatrixBase< ::Eigen::Matrix<float, (int)3, (int)3, (int)0, (int)3, (int)3> > ::determinant const" is undefined in device code

36 errors detected in the compilation of "/tmp/tmpxft_00007184_00000000-6_boundingvolume.cpp1.ii". CMake Error at cupoch_geometry_generated_boundingvolume.cu.o.cmake:280 (message): Error generating file /home/shankar/3D projects/cupoch/cupoch/build/src/cupoch/geometry/CMakeFiles/cupoch_geometry.dir//./cupoch_geometry_generated_boundingvolume.cu.o

make[1]: *** [CMakeFiles/Makefile2:755: src/cupoch/geometry/CMakeFiles/cupoch_geometry.dir/all] Error 2 make: *** [Makefile:130: all] Error 2

cupoch.cupoch.device_vector_vector3f can not convert to numpy array?

Hello,

Your Cupoch is really a useful tools.

when I run the example clustering.py , it gives me
Traceback (most recent call last): File "my_clustering.py", line 36, in <module> print("%s has %d points" % (pcl_name, np.asarray(pcl.points).shape[0])) IndexError: tuple index out of range

It seems that cupoch.cupoch.device_vector_vector3f can not convert to numpy array?

By the way my Os is Jectson Pack 4.2 with ubuntu18.04, and Cupoch is build from source with python2.7 binding.

Could you give me some advice?

Thank you.

ScalableTSDF

Hello,

First of all I want to say thank you for the amazing work you doing and sharing.

Do you have any plans to integrate open3d implementation of ScalableTSDF or any analogue of it?

Or will it be working with cupoch if I will take scalable tsdf class from cuda branch of open3d and compile it with cupoch (fixing namespaces and names)?

Thanks.

Fast global registration initial matching

Hi @neka-nat ,

I'm learning your fast global registration code. I noticed that you are using brute force matching when matching FPFH features between src cloud and dst cloud to establish correspondence. Why aren't you using kdtree? Is build and searching kdtree slower than brute force matching on GPU?

Thanks in advance.

KDTreeFlann

Hello, when I use EstimateNormals and ComputeFPFHFeature, I found that geometry::KDTreeFlann kdtree (that is, building kdtree) takes a lot of time. I want to update it here. Do you have any suggestions for improvement?

Image conversion between OpenCV and cupoch

Hi,
Thank you for great work.
I would like to convert OpenCV image types (CV_8C3, CV_16UC1, CV_32FC1, ...) to cupoch image. Do you know the best way to upload and download to OpenCV image.
Thank you

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.