{"id":13436105,"url":"https://github.com/PRBonn/vdbfusion","last_synced_at":"2025-03-18T12:31:12.054Z","repository":{"id":39963955,"uuid":"456980135","full_name":"PRBonn/vdbfusion","owner":"PRBonn","description":"C++/Python Sparse Volumetric TSDF Fusion","archived":false,"fork":false,"pushed_at":"2025-01-22T20:19:04.000Z","size":9778,"stargazers_count":520,"open_issues_count":7,"forks_count":54,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-03-16T13:02:11.482Z","etag":null,"topics":["3dmapping","lidar-point-cloud","rgbd","tsdf-fusion","tsdf-volume"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PRBonn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-08T15:02:53.000Z","updated_at":"2025-03-14T04:16:09.000Z","dependencies_parsed_at":"2024-01-04T08:41:11.827Z","dependency_job_id":"986fc83a-25ff-435f-b924-fa31e7e5e963","html_url":"https://github.com/PRBonn/vdbfusion","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PRBonn%2Fvdbfusion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PRBonn%2Fvdbfusion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PRBonn%2Fvdbfusion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PRBonn%2Fvdbfusion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PRBonn","download_url":"https://codeload.github.com/PRBonn/vdbfusion/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244222284,"owners_count":20418484,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3dmapping","lidar-point-cloud","rgbd","tsdf-fusion","tsdf-volume"],"created_at":"2024-07-31T03:00:44.055Z","updated_at":"2025-03-18T12:31:12.046Z","avatar_url":"https://github.com/PRBonn.png","language":"C++","funding_links":[],"categories":["C++"],"sub_categories":[],"readme":"# VDBFusion: Flexible and Efficient TSDF Integration\n\n[![C++](https://img.shields.io/badge/c++-%2300599C.svg?style=flat-square\u0026logo=c%2B%2B\u0026logoColor=white)](./src/vdbfusion/vdbfusion)\n[![Python](https://img.shields.io/badge/python-3670A0?style=flat-square\u0026logo=python\u0026logoColor=ffdd54)](src/vdbfusion/pybind)\n[![Linux](https://img.shields.io/badge/Linux-FCC624?logo=linux\u0026logoColor=black)](https://svgshare.com/i/Zhy.svg)\n[![PyPI version shields.io](https://img.shields.io/pypi/v/vdbfusion.svg?style=flat-square)](https://pypi.python.org/pypi/vdbfusion/)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://github.com/PRBonn/vdbfusion/pulls)\n[![Paper](https://img.shields.io/badge/paper-get-\u003cCOLOR\u003e.svg?style=flat-square)](https://www.ipb.uni-bonn.de/wp-content/papercite-data/pdf/vizzo2022sensors.pdf)\n[![MIT license](https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square)](https://lbesson.mit-license.org/)\n[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg?style=flat-square)](https://colab.research.google.com/github/PRBonn/vdbfusion/blob/main/examples/notebooks/kitti_odometry.ipynb)\n\n![example](docs/vdbfusion.gif)\n\nThis is a small utility library that implements the VDBFusion algorithm, similar to TSDF-based\nreconstruction pipelines but using a different data-structure (VDB).\n\n## Installation\n\nTake a seat and relax, you only need to:\n\n```shell\npip install vdbfusion\n```\n\nIf you plan to use our C++ API then you should build this project from source. More details in the [Installation instructions](INSTALL.md).\n\nThe ROS-1 C++ wrapper for this library is available at https://github.com/PRBonn/vdbfusion_ros\n\n## Usage\n\nThe code shown below is not intended to be copy pasted but rather be a spiritual guide for developers. If you really want to give this library a try you should consider checking the standalone [Python](examples/python), [Notebooks](examples/notebooks), and [C++](examples/cpp) examples.\n\n### Data loading\n\nNOTE: This step is not **mandatory**. Our API only expects `points` and `poses` but this is the easiest way to deal with 3D data.\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd\u003e \u003cb\u003e Python  \u003c/td\u003e \u003ctd\u003e \u003cb\u003e C++ \u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\n\n```python\nclass Dataset:\n    def __init__(self, *args, **kwargs):\n        # Initialize your dataset here ..\n\n    def __len__(self) -\u003e int:\n        return len(self.n_scans)\n\n    def __getitem__(self, idx: int):\n        # Returns a PointCloud(np.array(N, 3))\n        # and sensor origin(Eigen::Vector3d)\n        # in the global coordinate frame.\n        return points, origin\n```\n\n\u003c/td\u003e\n\u003ctd\u003e\n\n```c++\nclass Dataset {\n  // Initialize your dataset here ..\n  Dataset(...);\n\n  // Return length of the dataset\n  std::size_t size() const { return n_scans_; }\n\n  // Returns a Cloud(std::vector\u003cEigen::Vector3d\u003e)\n  // and the sensor origin(Eigen::Vector3d) in the\n  // global coordinate frame.\n  std::tuple\u003cCloud, Point\u003e operator[](int idx) const;\n};\n```\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n### TSDF Fusion pipeline\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd\u003e \u003cb\u003e Python  \u003c/td\u003e \u003ctd\u003e \u003cb\u003e C++ \u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\n\n```python\nimport vdbfusion\n\nvdb_volume = vdbfusion.VDBVolume(voxel_size,\n                                 sdf_trunc,\n                                 space_carving\ndataset = Dataset(...)\n\nfor scan, origin in dataset:\n    vdb_volume.integrate(scan, origin)\n```\n\n\u003c/td\u003e\n\u003ctd\u003e\n\n```cpp\n#include \"vdbfusion/VDBVolume.h\"\n\nvdb_fusion::VDBVolume vdb_volume(voxel_size,\n                                 sdf_trunc,\n                                 space_carving);\nconst auto dataset = Dataset(...);\n\nfor (const auto\u0026 [scan, origin] : iterable(dataset)) {\n  vdb_volume.Integrate(scan, origin);\n}\n```\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n### Visualization\n\nFor visualization you can use any 3D library you like. For this example we are going to be using `Open3D`. If you are using the Python API make sure to `pip install open3d` before trying this snippet.\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd\u003e \u003cb\u003e Python  \u003c/td\u003e \u003ctd\u003e \u003cb\u003e C++ \u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\n\n```python\nimport open3d as o3d\n\n# Extract triangle mesh (numpy arrays)\nvert, tri = vdb_volume.extract_triangle_mesh()\n\n# Visualize the results\nmesh = o3d.geometry.TriangleMesh(\n    o3d.utility.Vector3dVector(vert),\n    o3d.utility.Vector3iVector(tri),\n)\n\nmesh.compute_vertex_normals()\no3d.visualization.draw_geometries([mesh])\n```\n\n\u003c/td\u003e\n\u003ctd\u003e\n\n```cpp\n#include \u003copen3d/Open3D.h\u003e\n\n// Extract triangle mesh (Eigen).\nauto [verts, tris] = vdb_volume.ExtractTriangleMesh();\n\n// Visualize the results\nauto mesh = o3d::geometry::TriangleMesh(\n    verts,\n    tris,\n)\n\nmesh.ComputeVertexNormals()\no3d::visualization::DrawGeometries({\u0026mesh})\n```\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n## LICENSE\n\nThe [LICENSE](./LICENSE.txt) can be found at the root of this repository. It only applies to the code of `VDBFusion` but not to its [3rdparty dependencies](3rdparty/). Please make sure to check the licenses in there before using any form of this code.\n\n## Credits\n\nI would like to thank the [Open3D](https://github.com/isl-org/Open3D) and [OpenVDB](https://github.com/AcademySoftwareFoundation/openvdb) authors and contributors for making their implementations open source which inspired, helped and guided the implementation of the VDBFusion library.\n\n## Citation\n\nIf you use this library for any academic work, please cite the original [paper](https://www.ipb.uni-bonn.de/wp-content/papercite-data/pdf/vizzo2022sensors.pdf).\n\n```bibtex\n@article{vizzo2022sensors,\n  author         = {Vizzo, Ignacio and Guadagnino, Tiziano and Behley, Jens and Stachniss, Cyrill},\n  title          = {VDBFusion: Flexible and Efficient TSDF Integration of Range Sensor Data},\n  journal        = {Sensors},\n  volume         = {22},\n  year           = {2022},\n  number         = {3},\n  article-number = {1296},\n  url            = {https://www.mdpi.com/1424-8220/22/3/1296},\n  issn           = {1424-8220},\n  doi            = {10.3390/s22031296}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPRBonn%2Fvdbfusion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPRBonn%2Fvdbfusion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPRBonn%2Fvdbfusion/lists"}