cupoch

repository·main·Indexed 22 days ago

https://github.com/neka-nat/cupoch

A CUDA-accelerated library for 3D data processing and robotics computation. Cupoch provides GPU-accelerated algorithms for point clouds and meshes, including spatial queries (kNN), registration (ICP, Fast Global Registration), feature extraction (FPFH, SHOT, ISS), G-DBSCAN clustering, and robotics functions such as visual odometry and path planning. It supports DLPack integration for PyTorch and CuPy, and provides I/O support for pcd, ply, stl, obj, and urdf files.

Tokens
24K
Snippets
66
Records
111
Agent score
77%

What's inside cupoch

  1. What is GLFW?

    main

    GLFW is an open-source, multi-platform library designed for developing applications using OpenGL, OpenGL ES, and Vulkan. It provides a platform-independent API to handle common windowing and input tasks, including:

    • Creating windows, contexts, and surfaces
    • Reading input (keyboard, mouse, etc.)
    • Handling system events

    GLFW natively supports Windows, macOS, and Linux/Unix-like systems. It is licensed under the zlib/libpng license.

  2. Overview of Cupoch core features

    main

    Cupoch is a library for 3D data processing and robotics computation accelerated by CUDA. It provides a wide range of GPU-accelerated algorithms for point clouds and meshes, including:

    • Spatial Queries: k-Nearest Neighbors (kNN) using optimized LBVH construction.
    • Registration: ICP, Colored Point Cloud Registration, Fast Global Registration, and FilterReg.
    • Feature Extraction: FPFH, SHOT, and ISS keypoints.
    • Clustering: G-DBSCAN (GPU-accelerated density-based clustering).
    • Processing: Filtering, downsampling, and distance transforms.
    • Robotics & Vision: Visual Odometry, Kinect Fusion, Stereo Matching, Collision checking, Occupancy grids, and Path planning/finding.
    • I/O Support: Reading/writing pcd, ply, stl, obj, and urdf files, as well as ROS messages.
    • Data Interoperability: Seamless integration with DLPack for use with PyTorch, CuPy, and other deep learning frameworks.
    • Memory Management: Support for memory pools and managed allocators.
    • GUI: Interactive interface using OpenGL CUDA interop and imgui.
  3. Overview of JsonCpp

    main

    JsonCpp is a lightweight C++ library for manipulating JSON values. It supports serialization and deserialization to and from strings and can preserve existing comments during these processes, making it suitable for storing user input files.

    Compatibility Notes:

    • 1.y.z versions require C++11.
    • 0.y.z versions are compatible with older compilers.
    • Major versions maintain binary compatibility.
  4. Overview of Cupoch features

    main
    Cupoch is a CUDA-accelerated library designed for rapid 3D data processing in robotics applications such as SLAM, collision avoidance, path planning, and tracking. It is built upon Open3D and provides high-performance implementations of several core robotics algorithms.
  5. Overview of triangle intersection implementations

    main

    This component provides implementations for two specific geometric intersection tests based on research by Tomas Akenine-Moller:

    1. Triangle-Triangle Intersection Test: Based on "A Fast Triangle-Triangle Intersection Test".
    2. AABB-Triangle Overlap Test: Based on "Fast 3D Triangle-Box Overlap Testing".

    The code is in the public domain.

  6. Generate GLEW extension code

    main

    If you need to include new extensions or customize the code generation, you must use a Unix or Mac environment. Extension data is regenerated from the top-level source directory using the make extensions command.

    Alternatively, you can download pre-generated (unsupported) snapshots from SourceForge or Travis-built snapshots to avoid the complex code generation workflow involving GNU Make, Perl, and Python.

    make extensions
  7. Core capabilities of Cupoch

    main

    Cupoch provides a wide range of GPU-accelerated 3D processing features, including:

    Point Cloud Processing

    • Registration: ICP, Colored Point Cloud Registration, Fast Global Registration, and FilterReg.
    • Features & Keypoints: FPFH, SHOT, and ISS.
    • Clustering: G-DBSCAN (GPU Accelerated Density-based Clustering).
    • Filtering: Downsampling and filtering for both point clouds and triangle meshes.

    Robotics & Vision

    • Odometry: Visual Odometry (from dense RGB-D images) and Kinect Fusion.
    • Spatial Mapping: Occupancy grids, Distance transforms (using Parallel Banding Algorithm), and Stereo Matching.
    • Planning & Safety: Collision checking, path finding on graph structures, and path planning for collision avoidance.

    Data Handling & Interoperability

    • IO Support: Reads/writes pcd, ply, stl, obj, and urdf files, as well as ROS messages.
    • Sensor Input: Creation of point clouds from Laser Scans or RGB-D images.
    • Memory & Frameworks: Supports memory pools and managed allocators. It features interoperability with DLPack for seamless data sharing with PyTorch, CuPy, and other deep learning frameworks.

    Interface

    • GUI: An interactive GUI powered by OpenGL/CUDA interop and imgui.
  8. Choose between TurboJPEG and libjpeg APIs

    main

    libjpeg-turbo provides two distinct APIs for JPEG compression and decompression:

    • TurboJPEG API: Recommended for first-time users. It provides an easy-to-use interface for in-memory operations and includes specialized functionality like generating planar YUV images or performing multiple simultaneous lossless transforms. The Java interface is built on top of this API.
    • libjpeg API: The industry-standard API. It is more powerful but more complex to use. It is API/ABI-compatible and mathematically compatible with libjpeg v6b. It can optionally be configured to emulate libjpeg v7 or v8.

    There is no significant performance difference between the two APIs when performing similar operations.

  9. Understand the libjpeg-turbo license coverage

    main

    libjpeg-turbo uses three different licenses to cover different parts of the project:

    • The IJG (Independent JPEG Group) License: Applies to the libjpeg API library and associated programs (including any code inherited from libjpeg or modifications to it).
    • The Modified (3-clause) BSD License: Covers the TurboJPEG API library, associated programs, and the build system.
    • The zlib License: Covers the libjpeg-turbo SIMD extensions.
  10. Compile GLFW from source

    main

    GLFW can be compiled on various platforms using different compilers:

    • Windows: Visual C++ 2010 or later, MinGW, and MinGW-w64.
    • macOS: Clang.
    • Linux/Unix-like: GCC and Clang.

    Key Compilation Notes:

    • GLFW only requires the headers and libraries for your specific window system.
    • It does not require headers for context creation APIs (like WGL, GLX, EGL, NSGL, OSMesa) or rendering APIs (OpenGL, OpenGL ES, Vulkan) to enable support for them.
    • For Windows users, pre-compiled binaries are available on the official download page.
  11. Run JsonCpp tests manually

    main

    Manual testing is intended for troubleshooting. You must replace path/to/jsontest or path/to/test_lib_json with the actual paths to your compiled executables.

    Available Test Commands:

    • Reader/Writer tests: Runs standard JSON parsing and serialization tests.
    • Reader/Writer tests with JSONChecker: Uses the JSON_checker suite (note: JsonCpp may be more lenient than this suite, e.g., allowing integers to start with '0').
    • Unit tests: Runs tests primarily focused on the Value class.
    • Valgrind tests: Runs unit tests through Valgrind for memory debugging.
    cd test
    # Run Reader/Writer tests
    python runjsontests.py path/to/jsontest
    
    # Run Reader/Writer tests with JSONChecker
    python runjsontests.py --with-json-checker path/to/jsontest
    
    # Run unit tests
    python rununittests.py path/to/test_lib_json
    
    # Run unit tests with valgrind
    python rununittests.py --valgrind path/to/test_lib_json