![]() |
beluga_vdb package from beluga repobeluga beluga_amcl beluga_benchmark beluga_example beluga_ros beluga_system_tests beluga_tools beluga_tutorial beluga_vdb |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 1.0.0 |
License | Apache License 2.0 |
Build type | CMAKE |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/Ekumen-OS/beluga.git |
VCS Type | git |
VCS Version | main |
Last Updated | 2025-04-24 |
Dev Status | DEVELOPED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Gerardo Puga
- Ivan Paunovic
- Nahuel Espinosa
Authors
Beluga VDB
🌐 Overview
BelugaVDB is a library extension for beluga
that integrates OpenVDB, enabling advanced 3D localization capabilities. Currently, this extension uses OpenVDB to efficiently process 3D maps and pointcloud data.
🔰 Mapping
BelugaVDB requires level-set maps in vdb
format in order to work properly. VDB maps can be generated using suitables third party packages such as VDB Mapping, but the resulting map must be converted to a level-set map.
A simple post-processing code for adapting a map generated by VDB Mapping into a vdb
level-set map is shown below:
#include <openvdb/openvdb.h>
#include <openvdb/tools/TopologyToLevelSet.h>
int main()
{
openvdb::initialize();
// Create a VDB file object.
openvdb::io::File file("vdb_mapping_map.vdb");
// Open the file. This reads the file header, but not any grids.
file.open();
// Print the names of the grid
for (openvdb::io::File::NameIterator nameIter = file.beginName(); nameIter != file.endName(); ++nameIter)
{
std::cout << "Grid name: " << nameIter.gridName() << std::endl;
}
// Retrieve a shared pointer
openvdb::GridBase::Ptr baseGrid;
baseGrid = file.readGrid("[0]");
// Close the file
file.close();
// Cast the generic grid pointer to a FloatGrid pointer.
openvdb::FloatGrid::Ptr grid = openvdb::gridPtrCast<openvdb::FloatGrid>(baseGrid);
// Transform to level set
openvdb::FloatGrid::Ptr grid_levelset = nullptr;
grid_levelset = openvdb::tools::topologyToLevelSet(*grid, 3, 1, 0, 0);
// Save new grid
openvdb::io::File("levle_set_map.vdb").write({grid_levelset});
}
Also, vdb
level-set maps can be generated from pcd
maps (created from SLAM libraries such as FAST-LIO).
A simple code to generate a vdb
level-set map from a pcd
file is shown below:
```cpp #include <openvdb/openvdb.h> #include <openvdb/tree/Tree.h> #include <openvdb/tools/TopologyToLevelSet.h> #include <openvdb/math/Transform.h>
#include <pcl/io/pcd_io.h> #include <pcl/point_types.h>
#include
int main() { openvdb::initialize();
pcl::PointCloud<pcl::PointXYZ>::Ptr cloud (new pcl::PointCloud<pcl::PointXYZ>);
// Open PCD file
if (pcl::io::loadPCDFile<pcl::PointXYZ> ("map.pcd", *cloud) == -1) //* load the file
{
PCL_ERROR ("Couldn't read file map.pcd \n");
return (-1);
}
std::cout << "Loaded cloud succesfuly"<< std::endl;
// Create VDB grid of resolution 0.5
openvdb::FloatGrid::Ptr grid = openvdb::FloatGrid::create();
grid->setTransform(openvdb::math::Transform::createLinearTransform(0.5));
grid->setGridClass(openvdb::GRID_LEVEL_SET);
// Get an accessor for coordinate-based access to voxels.
openvdb::FloatGrid::Accessor accessor = grid->getAccessor();
// Fill the grid
for (const auto& point: *cloud)
{
// World coordinates
openvdb::Vec3f world_vect(point.x, point.y, point.z);
// Transform to index world
openvdb::math::Transform transform;
openvdb::math::Coord ijk = transform.worldToIndexCellCentered(world_vect);
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged beluga_vdb at Robotics Stack Exchange
![]() |
beluga_vdb package from beluga repobeluga beluga_amcl beluga_benchmark beluga_example beluga_ros beluga_system_tests beluga_tools beluga_tutorial beluga_vdb |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 1.0.0 |
License | Apache License 2.0 |
Build type | CMAKE |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/Ekumen-OS/beluga.git |
VCS Type | git |
VCS Version | main |
Last Updated | 2025-04-24 |
Dev Status | DEVELOPED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Gerardo Puga
- Ivan Paunovic
- Nahuel Espinosa
Authors
Beluga VDB
🌐 Overview
BelugaVDB is a library extension for beluga
that integrates OpenVDB, enabling advanced 3D localization capabilities. Currently, this extension uses OpenVDB to efficiently process 3D maps and pointcloud data.
🔰 Mapping
BelugaVDB requires level-set maps in vdb
format in order to work properly. VDB maps can be generated using suitables third party packages such as VDB Mapping, but the resulting map must be converted to a level-set map.
A simple post-processing code for adapting a map generated by VDB Mapping into a vdb
level-set map is shown below:
#include <openvdb/openvdb.h>
#include <openvdb/tools/TopologyToLevelSet.h>
int main()
{
openvdb::initialize();
// Create a VDB file object.
openvdb::io::File file("vdb_mapping_map.vdb");
// Open the file. This reads the file header, but not any grids.
file.open();
// Print the names of the grid
for (openvdb::io::File::NameIterator nameIter = file.beginName(); nameIter != file.endName(); ++nameIter)
{
std::cout << "Grid name: " << nameIter.gridName() << std::endl;
}
// Retrieve a shared pointer
openvdb::GridBase::Ptr baseGrid;
baseGrid = file.readGrid("[0]");
// Close the file
file.close();
// Cast the generic grid pointer to a FloatGrid pointer.
openvdb::FloatGrid::Ptr grid = openvdb::gridPtrCast<openvdb::FloatGrid>(baseGrid);
// Transform to level set
openvdb::FloatGrid::Ptr grid_levelset = nullptr;
grid_levelset = openvdb::tools::topologyToLevelSet(*grid, 3, 1, 0, 0);
// Save new grid
openvdb::io::File("levle_set_map.vdb").write({grid_levelset});
}
Also, vdb
level-set maps can be generated from pcd
maps (created from SLAM libraries such as FAST-LIO).
A simple code to generate a vdb
level-set map from a pcd
file is shown below:
```cpp #include <openvdb/openvdb.h> #include <openvdb/tree/Tree.h> #include <openvdb/tools/TopologyToLevelSet.h> #include <openvdb/math/Transform.h>
#include <pcl/io/pcd_io.h> #include <pcl/point_types.h>
#include
int main() { openvdb::initialize();
pcl::PointCloud<pcl::PointXYZ>::Ptr cloud (new pcl::PointCloud<pcl::PointXYZ>);
// Open PCD file
if (pcl::io::loadPCDFile<pcl::PointXYZ> ("map.pcd", *cloud) == -1) //* load the file
{
PCL_ERROR ("Couldn't read file map.pcd \n");
return (-1);
}
std::cout << "Loaded cloud succesfuly"<< std::endl;
// Create VDB grid of resolution 0.5
openvdb::FloatGrid::Ptr grid = openvdb::FloatGrid::create();
grid->setTransform(openvdb::math::Transform::createLinearTransform(0.5));
grid->setGridClass(openvdb::GRID_LEVEL_SET);
// Get an accessor for coordinate-based access to voxels.
openvdb::FloatGrid::Accessor accessor = grid->getAccessor();
// Fill the grid
for (const auto& point: *cloud)
{
// World coordinates
openvdb::Vec3f world_vect(point.x, point.y, point.z);
// Transform to index world
openvdb::math::Transform transform;
openvdb::math::Coord ijk = transform.worldToIndexCellCentered(world_vect);
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged beluga_vdb at Robotics Stack Exchange
![]() |
beluga_vdb package from beluga repobeluga beluga_amcl beluga_benchmark beluga_example beluga_ros beluga_system_tests beluga_tools beluga_tutorial beluga_vdb |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 1.0.0 |
License | Apache License 2.0 |
Build type | CMAKE |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/Ekumen-OS/beluga.git |
VCS Type | git |
VCS Version | main |
Last Updated | 2025-04-24 |
Dev Status | DEVELOPED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Gerardo Puga
- Ivan Paunovic
- Nahuel Espinosa
Authors
Beluga VDB
🌐 Overview
BelugaVDB is a library extension for beluga
that integrates OpenVDB, enabling advanced 3D localization capabilities. Currently, this extension uses OpenVDB to efficiently process 3D maps and pointcloud data.
🔰 Mapping
BelugaVDB requires level-set maps in vdb
format in order to work properly. VDB maps can be generated using suitables third party packages such as VDB Mapping, but the resulting map must be converted to a level-set map.
A simple post-processing code for adapting a map generated by VDB Mapping into a vdb
level-set map is shown below:
#include <openvdb/openvdb.h>
#include <openvdb/tools/TopologyToLevelSet.h>
int main()
{
openvdb::initialize();
// Create a VDB file object.
openvdb::io::File file("vdb_mapping_map.vdb");
// Open the file. This reads the file header, but not any grids.
file.open();
// Print the names of the grid
for (openvdb::io::File::NameIterator nameIter = file.beginName(); nameIter != file.endName(); ++nameIter)
{
std::cout << "Grid name: " << nameIter.gridName() << std::endl;
}
// Retrieve a shared pointer
openvdb::GridBase::Ptr baseGrid;
baseGrid = file.readGrid("[0]");
// Close the file
file.close();
// Cast the generic grid pointer to a FloatGrid pointer.
openvdb::FloatGrid::Ptr grid = openvdb::gridPtrCast<openvdb::FloatGrid>(baseGrid);
// Transform to level set
openvdb::FloatGrid::Ptr grid_levelset = nullptr;
grid_levelset = openvdb::tools::topologyToLevelSet(*grid, 3, 1, 0, 0);
// Save new grid
openvdb::io::File("levle_set_map.vdb").write({grid_levelset});
}
Also, vdb
level-set maps can be generated from pcd
maps (created from SLAM libraries such as FAST-LIO).
A simple code to generate a vdb
level-set map from a pcd
file is shown below:
```cpp #include <openvdb/openvdb.h> #include <openvdb/tree/Tree.h> #include <openvdb/tools/TopologyToLevelSet.h> #include <openvdb/math/Transform.h>
#include <pcl/io/pcd_io.h> #include <pcl/point_types.h>
#include
int main() { openvdb::initialize();
pcl::PointCloud<pcl::PointXYZ>::Ptr cloud (new pcl::PointCloud<pcl::PointXYZ>);
// Open PCD file
if (pcl::io::loadPCDFile<pcl::PointXYZ> ("map.pcd", *cloud) == -1) //* load the file
{
PCL_ERROR ("Couldn't read file map.pcd \n");
return (-1);
}
std::cout << "Loaded cloud succesfuly"<< std::endl;
// Create VDB grid of resolution 0.5
openvdb::FloatGrid::Ptr grid = openvdb::FloatGrid::create();
grid->setTransform(openvdb::math::Transform::createLinearTransform(0.5));
grid->setGridClass(openvdb::GRID_LEVEL_SET);
// Get an accessor for coordinate-based access to voxels.
openvdb::FloatGrid::Accessor accessor = grid->getAccessor();
// Fill the grid
for (const auto& point: *cloud)
{
// World coordinates
openvdb::Vec3f world_vect(point.x, point.y, point.z);
// Transform to index world
openvdb::math::Transform transform;
openvdb::math::Coord ijk = transform.worldToIndexCellCentered(world_vect);
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged beluga_vdb at Robotics Stack Exchange
![]() |
beluga_vdb package from beluga repobeluga beluga_amcl beluga_benchmark beluga_example beluga_ros beluga_system_tests beluga_tools beluga_tutorial beluga_vdb |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 1.0.0 |
License | Apache License 2.0 |
Build type | CMAKE |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/Ekumen-OS/beluga.git |
VCS Type | git |
VCS Version | main |
Last Updated | 2025-04-24 |
Dev Status | DEVELOPED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Gerardo Puga
- Ivan Paunovic
- Nahuel Espinosa
Authors
Beluga VDB
🌐 Overview
BelugaVDB is a library extension for beluga
that integrates OpenVDB, enabling advanced 3D localization capabilities. Currently, this extension uses OpenVDB to efficiently process 3D maps and pointcloud data.
🔰 Mapping
BelugaVDB requires level-set maps in vdb
format in order to work properly. VDB maps can be generated using suitables third party packages such as VDB Mapping, but the resulting map must be converted to a level-set map.
A simple post-processing code for adapting a map generated by VDB Mapping into a vdb
level-set map is shown below:
#include <openvdb/openvdb.h>
#include <openvdb/tools/TopologyToLevelSet.h>
int main()
{
openvdb::initialize();
// Create a VDB file object.
openvdb::io::File file("vdb_mapping_map.vdb");
// Open the file. This reads the file header, but not any grids.
file.open();
// Print the names of the grid
for (openvdb::io::File::NameIterator nameIter = file.beginName(); nameIter != file.endName(); ++nameIter)
{
std::cout << "Grid name: " << nameIter.gridName() << std::endl;
}
// Retrieve a shared pointer
openvdb::GridBase::Ptr baseGrid;
baseGrid = file.readGrid("[0]");
// Close the file
file.close();
// Cast the generic grid pointer to a FloatGrid pointer.
openvdb::FloatGrid::Ptr grid = openvdb::gridPtrCast<openvdb::FloatGrid>(baseGrid);
// Transform to level set
openvdb::FloatGrid::Ptr grid_levelset = nullptr;
grid_levelset = openvdb::tools::topologyToLevelSet(*grid, 3, 1, 0, 0);
// Save new grid
openvdb::io::File("levle_set_map.vdb").write({grid_levelset});
}
Also, vdb
level-set maps can be generated from pcd
maps (created from SLAM libraries such as FAST-LIO).
A simple code to generate a vdb
level-set map from a pcd
file is shown below:
```cpp #include <openvdb/openvdb.h> #include <openvdb/tree/Tree.h> #include <openvdb/tools/TopologyToLevelSet.h> #include <openvdb/math/Transform.h>
#include <pcl/io/pcd_io.h> #include <pcl/point_types.h>
#include
int main() { openvdb::initialize();
pcl::PointCloud<pcl::PointXYZ>::Ptr cloud (new pcl::PointCloud<pcl::PointXYZ>);
// Open PCD file
if (pcl::io::loadPCDFile<pcl::PointXYZ> ("map.pcd", *cloud) == -1) //* load the file
{
PCL_ERROR ("Couldn't read file map.pcd \n");
return (-1);
}
std::cout << "Loaded cloud succesfuly"<< std::endl;
// Create VDB grid of resolution 0.5
openvdb::FloatGrid::Ptr grid = openvdb::FloatGrid::create();
grid->setTransform(openvdb::math::Transform::createLinearTransform(0.5));
grid->setGridClass(openvdb::GRID_LEVEL_SET);
// Get an accessor for coordinate-based access to voxels.
openvdb::FloatGrid::Accessor accessor = grid->getAccessor();
// Fill the grid
for (const auto& point: *cloud)
{
// World coordinates
openvdb::Vec3f world_vect(point.x, point.y, point.z);
// Transform to index world
openvdb::math::Transform transform;
openvdb::math::Coord ijk = transform.worldToIndexCellCentered(world_vect);
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged beluga_vdb at Robotics Stack Exchange
![]() |
beluga_vdb package from beluga repobeluga beluga_amcl beluga_benchmark beluga_example beluga_ros beluga_system_tests beluga_tools beluga_tutorial beluga_vdb |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 1.0.0 |
License | Apache License 2.0 |
Build type | CMAKE |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/Ekumen-OS/beluga.git |
VCS Type | git |
VCS Version | main |
Last Updated | 2025-04-24 |
Dev Status | DEVELOPED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Gerardo Puga
- Ivan Paunovic
- Nahuel Espinosa
Authors
Beluga VDB
🌐 Overview
BelugaVDB is a library extension for beluga
that integrates OpenVDB, enabling advanced 3D localization capabilities. Currently, this extension uses OpenVDB to efficiently process 3D maps and pointcloud data.
🔰 Mapping
BelugaVDB requires level-set maps in vdb
format in order to work properly. VDB maps can be generated using suitables third party packages such as VDB Mapping, but the resulting map must be converted to a level-set map.
A simple post-processing code for adapting a map generated by VDB Mapping into a vdb
level-set map is shown below:
#include <openvdb/openvdb.h>
#include <openvdb/tools/TopologyToLevelSet.h>
int main()
{
openvdb::initialize();
// Create a VDB file object.
openvdb::io::File file("vdb_mapping_map.vdb");
// Open the file. This reads the file header, but not any grids.
file.open();
// Print the names of the grid
for (openvdb::io::File::NameIterator nameIter = file.beginName(); nameIter != file.endName(); ++nameIter)
{
std::cout << "Grid name: " << nameIter.gridName() << std::endl;
}
// Retrieve a shared pointer
openvdb::GridBase::Ptr baseGrid;
baseGrid = file.readGrid("[0]");
// Close the file
file.close();
// Cast the generic grid pointer to a FloatGrid pointer.
openvdb::FloatGrid::Ptr grid = openvdb::gridPtrCast<openvdb::FloatGrid>(baseGrid);
// Transform to level set
openvdb::FloatGrid::Ptr grid_levelset = nullptr;
grid_levelset = openvdb::tools::topologyToLevelSet(*grid, 3, 1, 0, 0);
// Save new grid
openvdb::io::File("levle_set_map.vdb").write({grid_levelset});
}
Also, vdb
level-set maps can be generated from pcd
maps (created from SLAM libraries such as FAST-LIO).
A simple code to generate a vdb
level-set map from a pcd
file is shown below:
```cpp #include <openvdb/openvdb.h> #include <openvdb/tree/Tree.h> #include <openvdb/tools/TopologyToLevelSet.h> #include <openvdb/math/Transform.h>
#include <pcl/io/pcd_io.h> #include <pcl/point_types.h>
#include
int main() { openvdb::initialize();
pcl::PointCloud<pcl::PointXYZ>::Ptr cloud (new pcl::PointCloud<pcl::PointXYZ>);
// Open PCD file
if (pcl::io::loadPCDFile<pcl::PointXYZ> ("map.pcd", *cloud) == -1) //* load the file
{
PCL_ERROR ("Couldn't read file map.pcd \n");
return (-1);
}
std::cout << "Loaded cloud succesfuly"<< std::endl;
// Create VDB grid of resolution 0.5
openvdb::FloatGrid::Ptr grid = openvdb::FloatGrid::create();
grid->setTransform(openvdb::math::Transform::createLinearTransform(0.5));
grid->setGridClass(openvdb::GRID_LEVEL_SET);
// Get an accessor for coordinate-based access to voxels.
openvdb::FloatGrid::Accessor accessor = grid->getAccessor();
// Fill the grid
for (const auto& point: *cloud)
{
// World coordinates
openvdb::Vec3f world_vect(point.x, point.y, point.z);
// Transform to index world
openvdb::math::Transform transform;
openvdb::math::Coord ijk = transform.worldToIndexCellCentered(world_vect);
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged beluga_vdb at Robotics Stack Exchange
![]() |
beluga_vdb package from beluga repobeluga beluga_amcl beluga_benchmark beluga_example beluga_ros beluga_system_tests beluga_tools beluga_tutorial beluga_vdb |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 1.0.0 |
License | Apache License 2.0 |
Build type | CMAKE |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/Ekumen-OS/beluga.git |
VCS Type | git |
VCS Version | main |
Last Updated | 2025-04-24 |
Dev Status | DEVELOPED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Gerardo Puga
- Ivan Paunovic
- Nahuel Espinosa
Authors
Beluga VDB
🌐 Overview
BelugaVDB is a library extension for beluga
that integrates OpenVDB, enabling advanced 3D localization capabilities. Currently, this extension uses OpenVDB to efficiently process 3D maps and pointcloud data.
🔰 Mapping
BelugaVDB requires level-set maps in vdb
format in order to work properly. VDB maps can be generated using suitables third party packages such as VDB Mapping, but the resulting map must be converted to a level-set map.
A simple post-processing code for adapting a map generated by VDB Mapping into a vdb
level-set map is shown below:
#include <openvdb/openvdb.h>
#include <openvdb/tools/TopologyToLevelSet.h>
int main()
{
openvdb::initialize();
// Create a VDB file object.
openvdb::io::File file("vdb_mapping_map.vdb");
// Open the file. This reads the file header, but not any grids.
file.open();
// Print the names of the grid
for (openvdb::io::File::NameIterator nameIter = file.beginName(); nameIter != file.endName(); ++nameIter)
{
std::cout << "Grid name: " << nameIter.gridName() << std::endl;
}
// Retrieve a shared pointer
openvdb::GridBase::Ptr baseGrid;
baseGrid = file.readGrid("[0]");
// Close the file
file.close();
// Cast the generic grid pointer to a FloatGrid pointer.
openvdb::FloatGrid::Ptr grid = openvdb::gridPtrCast<openvdb::FloatGrid>(baseGrid);
// Transform to level set
openvdb::FloatGrid::Ptr grid_levelset = nullptr;
grid_levelset = openvdb::tools::topologyToLevelSet(*grid, 3, 1, 0, 0);
// Save new grid
openvdb::io::File("levle_set_map.vdb").write({grid_levelset});
}
Also, vdb
level-set maps can be generated from pcd
maps (created from SLAM libraries such as FAST-LIO).
A simple code to generate a vdb
level-set map from a pcd
file is shown below:
```cpp #include <openvdb/openvdb.h> #include <openvdb/tree/Tree.h> #include <openvdb/tools/TopologyToLevelSet.h> #include <openvdb/math/Transform.h>
#include <pcl/io/pcd_io.h> #include <pcl/point_types.h>
#include
int main() { openvdb::initialize();
pcl::PointCloud<pcl::PointXYZ>::Ptr cloud (new pcl::PointCloud<pcl::PointXYZ>);
// Open PCD file
if (pcl::io::loadPCDFile<pcl::PointXYZ> ("map.pcd", *cloud) == -1) //* load the file
{
PCL_ERROR ("Couldn't read file map.pcd \n");
return (-1);
}
std::cout << "Loaded cloud succesfuly"<< std::endl;
// Create VDB grid of resolution 0.5
openvdb::FloatGrid::Ptr grid = openvdb::FloatGrid::create();
grid->setTransform(openvdb::math::Transform::createLinearTransform(0.5));
grid->setGridClass(openvdb::GRID_LEVEL_SET);
// Get an accessor for coordinate-based access to voxels.
openvdb::FloatGrid::Accessor accessor = grid->getAccessor();
// Fill the grid
for (const auto& point: *cloud)
{
// World coordinates
openvdb::Vec3f world_vect(point.x, point.y, point.z);
// Transform to index world
openvdb::math::Transform transform;
openvdb::math::Coord ijk = transform.worldToIndexCellCentered(world_vect);
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged beluga_vdb at Robotics Stack Exchange
![]() |
beluga_vdb package from beluga repobeluga beluga_amcl beluga_benchmark beluga_example beluga_ros beluga_system_tests beluga_tools beluga_tutorial beluga_vdb |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 1.0.0 |
License | Apache License 2.0 |
Build type | CMAKE |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/Ekumen-OS/beluga.git |
VCS Type | git |
VCS Version | main |
Last Updated | 2025-04-24 |
Dev Status | DEVELOPED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Gerardo Puga
- Ivan Paunovic
- Nahuel Espinosa
Authors
Beluga VDB
🌐 Overview
BelugaVDB is a library extension for beluga
that integrates OpenVDB, enabling advanced 3D localization capabilities. Currently, this extension uses OpenVDB to efficiently process 3D maps and pointcloud data.
🔰 Mapping
BelugaVDB requires level-set maps in vdb
format in order to work properly. VDB maps can be generated using suitables third party packages such as VDB Mapping, but the resulting map must be converted to a level-set map.
A simple post-processing code for adapting a map generated by VDB Mapping into a vdb
level-set map is shown below:
#include <openvdb/openvdb.h>
#include <openvdb/tools/TopologyToLevelSet.h>
int main()
{
openvdb::initialize();
// Create a VDB file object.
openvdb::io::File file("vdb_mapping_map.vdb");
// Open the file. This reads the file header, but not any grids.
file.open();
// Print the names of the grid
for (openvdb::io::File::NameIterator nameIter = file.beginName(); nameIter != file.endName(); ++nameIter)
{
std::cout << "Grid name: " << nameIter.gridName() << std::endl;
}
// Retrieve a shared pointer
openvdb::GridBase::Ptr baseGrid;
baseGrid = file.readGrid("[0]");
// Close the file
file.close();
// Cast the generic grid pointer to a FloatGrid pointer.
openvdb::FloatGrid::Ptr grid = openvdb::gridPtrCast<openvdb::FloatGrid>(baseGrid);
// Transform to level set
openvdb::FloatGrid::Ptr grid_levelset = nullptr;
grid_levelset = openvdb::tools::topologyToLevelSet(*grid, 3, 1, 0, 0);
// Save new grid
openvdb::io::File("levle_set_map.vdb").write({grid_levelset});
}
Also, vdb
level-set maps can be generated from pcd
maps (created from SLAM libraries such as FAST-LIO).
A simple code to generate a vdb
level-set map from a pcd
file is shown below:
```cpp #include <openvdb/openvdb.h> #include <openvdb/tree/Tree.h> #include <openvdb/tools/TopologyToLevelSet.h> #include <openvdb/math/Transform.h>
#include <pcl/io/pcd_io.h> #include <pcl/point_types.h>
#include
int main() { openvdb::initialize();
pcl::PointCloud<pcl::PointXYZ>::Ptr cloud (new pcl::PointCloud<pcl::PointXYZ>);
// Open PCD file
if (pcl::io::loadPCDFile<pcl::PointXYZ> ("map.pcd", *cloud) == -1) //* load the file
{
PCL_ERROR ("Couldn't read file map.pcd \n");
return (-1);
}
std::cout << "Loaded cloud succesfuly"<< std::endl;
// Create VDB grid of resolution 0.5
openvdb::FloatGrid::Ptr grid = openvdb::FloatGrid::create();
grid->setTransform(openvdb::math::Transform::createLinearTransform(0.5));
grid->setGridClass(openvdb::GRID_LEVEL_SET);
// Get an accessor for coordinate-based access to voxels.
openvdb::FloatGrid::Accessor accessor = grid->getAccessor();
// Fill the grid
for (const auto& point: *cloud)
{
// World coordinates
openvdb::Vec3f world_vect(point.x, point.y, point.z);
// Transform to index world
openvdb::math::Transform transform;
openvdb::math::Coord ijk = transform.worldToIndexCellCentered(world_vect);
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged beluga_vdb at Robotics Stack Exchange
![]() |
beluga_vdb package from beluga repobeluga beluga_amcl beluga_benchmark beluga_example beluga_ros beluga_system_tests beluga_tools beluga_tutorial beluga_vdb |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 1.0.0 |
License | Apache License 2.0 |
Build type | CMAKE |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/Ekumen-OS/beluga.git |
VCS Type | git |
VCS Version | main |
Last Updated | 2025-04-24 |
Dev Status | DEVELOPED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Gerardo Puga
- Ivan Paunovic
- Nahuel Espinosa
Authors
Beluga VDB
🌐 Overview
BelugaVDB is a library extension for beluga
that integrates OpenVDB, enabling advanced 3D localization capabilities. Currently, this extension uses OpenVDB to efficiently process 3D maps and pointcloud data.
🔰 Mapping
BelugaVDB requires level-set maps in vdb
format in order to work properly. VDB maps can be generated using suitables third party packages such as VDB Mapping, but the resulting map must be converted to a level-set map.
A simple post-processing code for adapting a map generated by VDB Mapping into a vdb
level-set map is shown below:
#include <openvdb/openvdb.h>
#include <openvdb/tools/TopologyToLevelSet.h>
int main()
{
openvdb::initialize();
// Create a VDB file object.
openvdb::io::File file("vdb_mapping_map.vdb");
// Open the file. This reads the file header, but not any grids.
file.open();
// Print the names of the grid
for (openvdb::io::File::NameIterator nameIter = file.beginName(); nameIter != file.endName(); ++nameIter)
{
std::cout << "Grid name: " << nameIter.gridName() << std::endl;
}
// Retrieve a shared pointer
openvdb::GridBase::Ptr baseGrid;
baseGrid = file.readGrid("[0]");
// Close the file
file.close();
// Cast the generic grid pointer to a FloatGrid pointer.
openvdb::FloatGrid::Ptr grid = openvdb::gridPtrCast<openvdb::FloatGrid>(baseGrid);
// Transform to level set
openvdb::FloatGrid::Ptr grid_levelset = nullptr;
grid_levelset = openvdb::tools::topologyToLevelSet(*grid, 3, 1, 0, 0);
// Save new grid
openvdb::io::File("levle_set_map.vdb").write({grid_levelset});
}
Also, vdb
level-set maps can be generated from pcd
maps (created from SLAM libraries such as FAST-LIO).
A simple code to generate a vdb
level-set map from a pcd
file is shown below:
```cpp #include <openvdb/openvdb.h> #include <openvdb/tree/Tree.h> #include <openvdb/tools/TopologyToLevelSet.h> #include <openvdb/math/Transform.h>
#include <pcl/io/pcd_io.h> #include <pcl/point_types.h>
#include
int main() { openvdb::initialize();
pcl::PointCloud<pcl::PointXYZ>::Ptr cloud (new pcl::PointCloud<pcl::PointXYZ>);
// Open PCD file
if (pcl::io::loadPCDFile<pcl::PointXYZ> ("map.pcd", *cloud) == -1) //* load the file
{
PCL_ERROR ("Couldn't read file map.pcd \n");
return (-1);
}
std::cout << "Loaded cloud succesfuly"<< std::endl;
// Create VDB grid of resolution 0.5
openvdb::FloatGrid::Ptr grid = openvdb::FloatGrid::create();
grid->setTransform(openvdb::math::Transform::createLinearTransform(0.5));
grid->setGridClass(openvdb::GRID_LEVEL_SET);
// Get an accessor for coordinate-based access to voxels.
openvdb::FloatGrid::Accessor accessor = grid->getAccessor();
// Fill the grid
for (const auto& point: *cloud)
{
// World coordinates
openvdb::Vec3f world_vect(point.x, point.y, point.z);
// Transform to index world
openvdb::math::Transform transform;
openvdb::math::Coord ijk = transform.worldToIndexCellCentered(world_vect);
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged beluga_vdb at Robotics Stack Exchange
![]() |
beluga_vdb package from beluga repobeluga beluga_amcl beluga_benchmark beluga_example beluga_ros beluga_system_tests beluga_tools beluga_tutorial beluga_vdb |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 1.0.0 |
License | Apache License 2.0 |
Build type | CMAKE |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/Ekumen-OS/beluga.git |
VCS Type | git |
VCS Version | main |
Last Updated | 2025-04-24 |
Dev Status | DEVELOPED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Gerardo Puga
- Ivan Paunovic
- Nahuel Espinosa
Authors
Beluga VDB
🌐 Overview
BelugaVDB is a library extension for beluga
that integrates OpenVDB, enabling advanced 3D localization capabilities. Currently, this extension uses OpenVDB to efficiently process 3D maps and pointcloud data.
🔰 Mapping
BelugaVDB requires level-set maps in vdb
format in order to work properly. VDB maps can be generated using suitables third party packages such as VDB Mapping, but the resulting map must be converted to a level-set map.
A simple post-processing code for adapting a map generated by VDB Mapping into a vdb
level-set map is shown below:
#include <openvdb/openvdb.h>
#include <openvdb/tools/TopologyToLevelSet.h>
int main()
{
openvdb::initialize();
// Create a VDB file object.
openvdb::io::File file("vdb_mapping_map.vdb");
// Open the file. This reads the file header, but not any grids.
file.open();
// Print the names of the grid
for (openvdb::io::File::NameIterator nameIter = file.beginName(); nameIter != file.endName(); ++nameIter)
{
std::cout << "Grid name: " << nameIter.gridName() << std::endl;
}
// Retrieve a shared pointer
openvdb::GridBase::Ptr baseGrid;
baseGrid = file.readGrid("[0]");
// Close the file
file.close();
// Cast the generic grid pointer to a FloatGrid pointer.
openvdb::FloatGrid::Ptr grid = openvdb::gridPtrCast<openvdb::FloatGrid>(baseGrid);
// Transform to level set
openvdb::FloatGrid::Ptr grid_levelset = nullptr;
grid_levelset = openvdb::tools::topologyToLevelSet(*grid, 3, 1, 0, 0);
// Save new grid
openvdb::io::File("levle_set_map.vdb").write({grid_levelset});
}
Also, vdb
level-set maps can be generated from pcd
maps (created from SLAM libraries such as FAST-LIO).
A simple code to generate a vdb
level-set map from a pcd
file is shown below:
```cpp #include <openvdb/openvdb.h> #include <openvdb/tree/Tree.h> #include <openvdb/tools/TopologyToLevelSet.h> #include <openvdb/math/Transform.h>
#include <pcl/io/pcd_io.h> #include <pcl/point_types.h>
#include
int main() { openvdb::initialize();
pcl::PointCloud<pcl::PointXYZ>::Ptr cloud (new pcl::PointCloud<pcl::PointXYZ>);
// Open PCD file
if (pcl::io::loadPCDFile<pcl::PointXYZ> ("map.pcd", *cloud) == -1) //* load the file
{
PCL_ERROR ("Couldn't read file map.pcd \n");
return (-1);
}
std::cout << "Loaded cloud succesfuly"<< std::endl;
// Create VDB grid of resolution 0.5
openvdb::FloatGrid::Ptr grid = openvdb::FloatGrid::create();
grid->setTransform(openvdb::math::Transform::createLinearTransform(0.5));
grid->setGridClass(openvdb::GRID_LEVEL_SET);
// Get an accessor for coordinate-based access to voxels.
openvdb::FloatGrid::Accessor accessor = grid->getAccessor();
// Fill the grid
for (const auto& point: *cloud)
{
// World coordinates
openvdb::Vec3f world_vect(point.x, point.y, point.z);
// Transform to index world
openvdb::math::Transform transform;
openvdb::math::Coord ijk = transform.worldToIndexCellCentered(world_vect);
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged beluga_vdb at Robotics Stack Exchange
![]() |
beluga_vdb package from beluga repobeluga beluga_amcl beluga_benchmark beluga_example beluga_ros beluga_system_tests beluga_tools beluga_tutorial beluga_vdb |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 1.0.0 |
License | Apache License 2.0 |
Build type | CMAKE |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/Ekumen-OS/beluga.git |
VCS Type | git |
VCS Version | main |
Last Updated | 2025-04-24 |
Dev Status | DEVELOPED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Gerardo Puga
- Ivan Paunovic
- Nahuel Espinosa
Authors
Beluga VDB
🌐 Overview
BelugaVDB is a library extension for beluga
that integrates OpenVDB, enabling advanced 3D localization capabilities. Currently, this extension uses OpenVDB to efficiently process 3D maps and pointcloud data.
🔰 Mapping
BelugaVDB requires level-set maps in vdb
format in order to work properly. VDB maps can be generated using suitables third party packages such as VDB Mapping, but the resulting map must be converted to a level-set map.
A simple post-processing code for adapting a map generated by VDB Mapping into a vdb
level-set map is shown below:
#include <openvdb/openvdb.h>
#include <openvdb/tools/TopologyToLevelSet.h>
int main()
{
openvdb::initialize();
// Create a VDB file object.
openvdb::io::File file("vdb_mapping_map.vdb");
// Open the file. This reads the file header, but not any grids.
file.open();
// Print the names of the grid
for (openvdb::io::File::NameIterator nameIter = file.beginName(); nameIter != file.endName(); ++nameIter)
{
std::cout << "Grid name: " << nameIter.gridName() << std::endl;
}
// Retrieve a shared pointer
openvdb::GridBase::Ptr baseGrid;
baseGrid = file.readGrid("[0]");
// Close the file
file.close();
// Cast the generic grid pointer to a FloatGrid pointer.
openvdb::FloatGrid::Ptr grid = openvdb::gridPtrCast<openvdb::FloatGrid>(baseGrid);
// Transform to level set
openvdb::FloatGrid::Ptr grid_levelset = nullptr;
grid_levelset = openvdb::tools::topologyToLevelSet(*grid, 3, 1, 0, 0);
// Save new grid
openvdb::io::File("levle_set_map.vdb").write({grid_levelset});
}
Also, vdb
level-set maps can be generated from pcd
maps (created from SLAM libraries such as FAST-LIO).
A simple code to generate a vdb
level-set map from a pcd
file is shown below:
```cpp #include <openvdb/openvdb.h> #include <openvdb/tree/Tree.h> #include <openvdb/tools/TopologyToLevelSet.h> #include <openvdb/math/Transform.h>
#include <pcl/io/pcd_io.h> #include <pcl/point_types.h>
#include
int main() { openvdb::initialize();
pcl::PointCloud<pcl::PointXYZ>::Ptr cloud (new pcl::PointCloud<pcl::PointXYZ>);
// Open PCD file
if (pcl::io::loadPCDFile<pcl::PointXYZ> ("map.pcd", *cloud) == -1) //* load the file
{
PCL_ERROR ("Couldn't read file map.pcd \n");
return (-1);
}
std::cout << "Loaded cloud succesfuly"<< std::endl;
// Create VDB grid of resolution 0.5
openvdb::FloatGrid::Ptr grid = openvdb::FloatGrid::create();
grid->setTransform(openvdb::math::Transform::createLinearTransform(0.5));
grid->setGridClass(openvdb::GRID_LEVEL_SET);
// Get an accessor for coordinate-based access to voxels.
openvdb::FloatGrid::Accessor accessor = grid->getAccessor();
// Fill the grid
for (const auto& point: *cloud)
{
// World coordinates
openvdb::Vec3f world_vect(point.x, point.y, point.z);
// Transform to index world
openvdb::math::Transform transform;
openvdb::math::Coord ijk = transform.worldToIndexCellCentered(world_vect);
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged beluga_vdb at Robotics Stack Exchange
![]() |
beluga_vdb package from beluga repobeluga beluga_amcl beluga_benchmark beluga_example beluga_ros beluga_system_tests beluga_tools beluga_tutorial beluga_vdb |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 1.0.0 |
License | Apache License 2.0 |
Build type | CMAKE |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/Ekumen-OS/beluga.git |
VCS Type | git |
VCS Version | main |
Last Updated | 2025-04-24 |
Dev Status | DEVELOPED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Gerardo Puga
- Ivan Paunovic
- Nahuel Espinosa
Authors
Beluga VDB
🌐 Overview
BelugaVDB is a library extension for beluga
that integrates OpenVDB, enabling advanced 3D localization capabilities. Currently, this extension uses OpenVDB to efficiently process 3D maps and pointcloud data.
🔰 Mapping
BelugaVDB requires level-set maps in vdb
format in order to work properly. VDB maps can be generated using suitables third party packages such as VDB Mapping, but the resulting map must be converted to a level-set map.
A simple post-processing code for adapting a map generated by VDB Mapping into a vdb
level-set map is shown below:
#include <openvdb/openvdb.h>
#include <openvdb/tools/TopologyToLevelSet.h>
int main()
{
openvdb::initialize();
// Create a VDB file object.
openvdb::io::File file("vdb_mapping_map.vdb");
// Open the file. This reads the file header, but not any grids.
file.open();
// Print the names of the grid
for (openvdb::io::File::NameIterator nameIter = file.beginName(); nameIter != file.endName(); ++nameIter)
{
std::cout << "Grid name: " << nameIter.gridName() << std::endl;
}
// Retrieve a shared pointer
openvdb::GridBase::Ptr baseGrid;
baseGrid = file.readGrid("[0]");
// Close the file
file.close();
// Cast the generic grid pointer to a FloatGrid pointer.
openvdb::FloatGrid::Ptr grid = openvdb::gridPtrCast<openvdb::FloatGrid>(baseGrid);
// Transform to level set
openvdb::FloatGrid::Ptr grid_levelset = nullptr;
grid_levelset = openvdb::tools::topologyToLevelSet(*grid, 3, 1, 0, 0);
// Save new grid
openvdb::io::File("levle_set_map.vdb").write({grid_levelset});
}
Also, vdb
level-set maps can be generated from pcd
maps (created from SLAM libraries such as FAST-LIO).
A simple code to generate a vdb
level-set map from a pcd
file is shown below:
```cpp #include <openvdb/openvdb.h> #include <openvdb/tree/Tree.h> #include <openvdb/tools/TopologyToLevelSet.h> #include <openvdb/math/Transform.h>
#include <pcl/io/pcd_io.h> #include <pcl/point_types.h>
#include
int main() { openvdb::initialize();
pcl::PointCloud<pcl::PointXYZ>::Ptr cloud (new pcl::PointCloud<pcl::PointXYZ>);
// Open PCD file
if (pcl::io::loadPCDFile<pcl::PointXYZ> ("map.pcd", *cloud) == -1) //* load the file
{
PCL_ERROR ("Couldn't read file map.pcd \n");
return (-1);
}
std::cout << "Loaded cloud succesfuly"<< std::endl;
// Create VDB grid of resolution 0.5
openvdb::FloatGrid::Ptr grid = openvdb::FloatGrid::create();
grid->setTransform(openvdb::math::Transform::createLinearTransform(0.5));
grid->setGridClass(openvdb::GRID_LEVEL_SET);
// Get an accessor for coordinate-based access to voxels.
openvdb::FloatGrid::Accessor accessor = grid->getAccessor();
// Fill the grid
for (const auto& point: *cloud)
{
// World coordinates
openvdb::Vec3f world_vect(point.x, point.y, point.z);
// Transform to index world
openvdb::math::Transform transform;
openvdb::math::Coord ijk = transform.worldToIndexCellCentered(world_vect);
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged beluga_vdb at Robotics Stack Exchange
![]() |
beluga_vdb package from beluga repobeluga beluga_amcl beluga_benchmark beluga_example beluga_ros beluga_system_tests beluga_tools beluga_tutorial beluga_vdb |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 1.0.0 |
License | Apache License 2.0 |
Build type | CMAKE |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/Ekumen-OS/beluga.git |
VCS Type | git |
VCS Version | main |
Last Updated | 2025-04-24 |
Dev Status | DEVELOPED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Gerardo Puga
- Ivan Paunovic
- Nahuel Espinosa
Authors
Beluga VDB
🌐 Overview
BelugaVDB is a library extension for beluga
that integrates OpenVDB, enabling advanced 3D localization capabilities. Currently, this extension uses OpenVDB to efficiently process 3D maps and pointcloud data.
🔰 Mapping
BelugaVDB requires level-set maps in vdb
format in order to work properly. VDB maps can be generated using suitables third party packages such as VDB Mapping, but the resulting map must be converted to a level-set map.
A simple post-processing code for adapting a map generated by VDB Mapping into a vdb
level-set map is shown below:
#include <openvdb/openvdb.h>
#include <openvdb/tools/TopologyToLevelSet.h>
int main()
{
openvdb::initialize();
// Create a VDB file object.
openvdb::io::File file("vdb_mapping_map.vdb");
// Open the file. This reads the file header, but not any grids.
file.open();
// Print the names of the grid
for (openvdb::io::File::NameIterator nameIter = file.beginName(); nameIter != file.endName(); ++nameIter)
{
std::cout << "Grid name: " << nameIter.gridName() << std::endl;
}
// Retrieve a shared pointer
openvdb::GridBase::Ptr baseGrid;
baseGrid = file.readGrid("[0]");
// Close the file
file.close();
// Cast the generic grid pointer to a FloatGrid pointer.
openvdb::FloatGrid::Ptr grid = openvdb::gridPtrCast<openvdb::FloatGrid>(baseGrid);
// Transform to level set
openvdb::FloatGrid::Ptr grid_levelset = nullptr;
grid_levelset = openvdb::tools::topologyToLevelSet(*grid, 3, 1, 0, 0);
// Save new grid
openvdb::io::File("levle_set_map.vdb").write({grid_levelset});
}
Also, vdb
level-set maps can be generated from pcd
maps (created from SLAM libraries such as FAST-LIO).
A simple code to generate a vdb
level-set map from a pcd
file is shown below:
```cpp #include <openvdb/openvdb.h> #include <openvdb/tree/Tree.h> #include <openvdb/tools/TopologyToLevelSet.h> #include <openvdb/math/Transform.h>
#include <pcl/io/pcd_io.h> #include <pcl/point_types.h>
#include
int main() { openvdb::initialize();
pcl::PointCloud<pcl::PointXYZ>::Ptr cloud (new pcl::PointCloud<pcl::PointXYZ>);
// Open PCD file
if (pcl::io::loadPCDFile<pcl::PointXYZ> ("map.pcd", *cloud) == -1) //* load the file
{
PCL_ERROR ("Couldn't read file map.pcd \n");
return (-1);
}
std::cout << "Loaded cloud succesfuly"<< std::endl;
// Create VDB grid of resolution 0.5
openvdb::FloatGrid::Ptr grid = openvdb::FloatGrid::create();
grid->setTransform(openvdb::math::Transform::createLinearTransform(0.5));
grid->setGridClass(openvdb::GRID_LEVEL_SET);
// Get an accessor for coordinate-based access to voxels.
openvdb::FloatGrid::Accessor accessor = grid->getAccessor();
// Fill the grid
for (const auto& point: *cloud)
{
// World coordinates
openvdb::Vec3f world_vect(point.x, point.y, point.z);
// Transform to index world
openvdb::math::Transform transform;
openvdb::math::Coord ijk = transform.worldToIndexCellCentered(world_vect);
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged beluga_vdb at Robotics Stack Exchange
![]() |
beluga_vdb package from beluga repobeluga beluga_amcl beluga_benchmark beluga_example beluga_ros beluga_system_tests beluga_tools beluga_tutorial beluga_vdb |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 1.0.0 |
License | Apache License 2.0 |
Build type | CMAKE |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/Ekumen-OS/beluga.git |
VCS Type | git |
VCS Version | main |
Last Updated | 2025-04-24 |
Dev Status | DEVELOPED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Gerardo Puga
- Ivan Paunovic
- Nahuel Espinosa
Authors
Beluga VDB
🌐 Overview
BelugaVDB is a library extension for beluga
that integrates OpenVDB, enabling advanced 3D localization capabilities. Currently, this extension uses OpenVDB to efficiently process 3D maps and pointcloud data.
🔰 Mapping
BelugaVDB requires level-set maps in vdb
format in order to work properly. VDB maps can be generated using suitables third party packages such as VDB Mapping, but the resulting map must be converted to a level-set map.
A simple post-processing code for adapting a map generated by VDB Mapping into a vdb
level-set map is shown below:
#include <openvdb/openvdb.h>
#include <openvdb/tools/TopologyToLevelSet.h>
int main()
{
openvdb::initialize();
// Create a VDB file object.
openvdb::io::File file("vdb_mapping_map.vdb");
// Open the file. This reads the file header, but not any grids.
file.open();
// Print the names of the grid
for (openvdb::io::File::NameIterator nameIter = file.beginName(); nameIter != file.endName(); ++nameIter)
{
std::cout << "Grid name: " << nameIter.gridName() << std::endl;
}
// Retrieve a shared pointer
openvdb::GridBase::Ptr baseGrid;
baseGrid = file.readGrid("[0]");
// Close the file
file.close();
// Cast the generic grid pointer to a FloatGrid pointer.
openvdb::FloatGrid::Ptr grid = openvdb::gridPtrCast<openvdb::FloatGrid>(baseGrid);
// Transform to level set
openvdb::FloatGrid::Ptr grid_levelset = nullptr;
grid_levelset = openvdb::tools::topologyToLevelSet(*grid, 3, 1, 0, 0);
// Save new grid
openvdb::io::File("levle_set_map.vdb").write({grid_levelset});
}
Also, vdb
level-set maps can be generated from pcd
maps (created from SLAM libraries such as FAST-LIO).
A simple code to generate a vdb
level-set map from a pcd
file is shown below:
```cpp #include <openvdb/openvdb.h> #include <openvdb/tree/Tree.h> #include <openvdb/tools/TopologyToLevelSet.h> #include <openvdb/math/Transform.h>
#include <pcl/io/pcd_io.h> #include <pcl/point_types.h>
#include
int main() { openvdb::initialize();
pcl::PointCloud<pcl::PointXYZ>::Ptr cloud (new pcl::PointCloud<pcl::PointXYZ>);
// Open PCD file
if (pcl::io::loadPCDFile<pcl::PointXYZ> ("map.pcd", *cloud) == -1) //* load the file
{
PCL_ERROR ("Couldn't read file map.pcd \n");
return (-1);
}
std::cout << "Loaded cloud succesfuly"<< std::endl;
// Create VDB grid of resolution 0.5
openvdb::FloatGrid::Ptr grid = openvdb::FloatGrid::create();
grid->setTransform(openvdb::math::Transform::createLinearTransform(0.5));
grid->setGridClass(openvdb::GRID_LEVEL_SET);
// Get an accessor for coordinate-based access to voxels.
openvdb::FloatGrid::Accessor accessor = grid->getAccessor();
// Fill the grid
for (const auto& point: *cloud)
{
// World coordinates
openvdb::Vec3f world_vect(point.x, point.y, point.z);
// Transform to index world
openvdb::math::Transform transform;
openvdb::math::Coord ijk = transform.worldToIndexCellCentered(world_vect);
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged beluga_vdb at Robotics Stack Exchange
![]() |
beluga_vdb package from beluga repobeluga beluga_amcl beluga_benchmark beluga_example beluga_ros beluga_system_tests beluga_tools beluga_tutorial beluga_vdb |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 1.0.0 |
License | Apache License 2.0 |
Build type | CMAKE |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/Ekumen-OS/beluga.git |
VCS Type | git |
VCS Version | main |
Last Updated | 2025-04-24 |
Dev Status | DEVELOPED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Gerardo Puga
- Ivan Paunovic
- Nahuel Espinosa
Authors
Beluga VDB
🌐 Overview
BelugaVDB is a library extension for beluga
that integrates OpenVDB, enabling advanced 3D localization capabilities. Currently, this extension uses OpenVDB to efficiently process 3D maps and pointcloud data.
🔰 Mapping
BelugaVDB requires level-set maps in vdb
format in order to work properly. VDB maps can be generated using suitables third party packages such as VDB Mapping, but the resulting map must be converted to a level-set map.
A simple post-processing code for adapting a map generated by VDB Mapping into a vdb
level-set map is shown below:
#include <openvdb/openvdb.h>
#include <openvdb/tools/TopologyToLevelSet.h>
int main()
{
openvdb::initialize();
// Create a VDB file object.
openvdb::io::File file("vdb_mapping_map.vdb");
// Open the file. This reads the file header, but not any grids.
file.open();
// Print the names of the grid
for (openvdb::io::File::NameIterator nameIter = file.beginName(); nameIter != file.endName(); ++nameIter)
{
std::cout << "Grid name: " << nameIter.gridName() << std::endl;
}
// Retrieve a shared pointer
openvdb::GridBase::Ptr baseGrid;
baseGrid = file.readGrid("[0]");
// Close the file
file.close();
// Cast the generic grid pointer to a FloatGrid pointer.
openvdb::FloatGrid::Ptr grid = openvdb::gridPtrCast<openvdb::FloatGrid>(baseGrid);
// Transform to level set
openvdb::FloatGrid::Ptr grid_levelset = nullptr;
grid_levelset = openvdb::tools::topologyToLevelSet(*grid, 3, 1, 0, 0);
// Save new grid
openvdb::io::File("levle_set_map.vdb").write({grid_levelset});
}
Also, vdb
level-set maps can be generated from pcd
maps (created from SLAM libraries such as FAST-LIO).
A simple code to generate a vdb
level-set map from a pcd
file is shown below:
```cpp #include <openvdb/openvdb.h> #include <openvdb/tree/Tree.h> #include <openvdb/tools/TopologyToLevelSet.h> #include <openvdb/math/Transform.h>
#include <pcl/io/pcd_io.h> #include <pcl/point_types.h>
#include
int main() { openvdb::initialize();
pcl::PointCloud<pcl::PointXYZ>::Ptr cloud (new pcl::PointCloud<pcl::PointXYZ>);
// Open PCD file
if (pcl::io::loadPCDFile<pcl::PointXYZ> ("map.pcd", *cloud) == -1) //* load the file
{
PCL_ERROR ("Couldn't read file map.pcd \n");
return (-1);
}
std::cout << "Loaded cloud succesfuly"<< std::endl;
// Create VDB grid of resolution 0.5
openvdb::FloatGrid::Ptr grid = openvdb::FloatGrid::create();
grid->setTransform(openvdb::math::Transform::createLinearTransform(0.5));
grid->setGridClass(openvdb::GRID_LEVEL_SET);
// Get an accessor for coordinate-based access to voxels.
openvdb::FloatGrid::Accessor accessor = grid->getAccessor();
// Fill the grid
for (const auto& point: *cloud)
{
// World coordinates
openvdb::Vec3f world_vect(point.x, point.y, point.z);
// Transform to index world
openvdb::math::Transform transform;
openvdb::math::Coord ijk = transform.worldToIndexCellCentered(world_vect);
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged beluga_vdb at Robotics Stack Exchange
![]() |
beluga_vdb package from beluga repobeluga beluga_amcl beluga_benchmark beluga_example beluga_ros beluga_system_tests beluga_tools beluga_tutorial beluga_vdb |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 1.0.0 |
License | Apache License 2.0 |
Build type | CMAKE |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/Ekumen-OS/beluga.git |
VCS Type | git |
VCS Version | main |
Last Updated | 2025-04-24 |
Dev Status | DEVELOPED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Gerardo Puga
- Ivan Paunovic
- Nahuel Espinosa
Authors
Beluga VDB
🌐 Overview
BelugaVDB is a library extension for beluga
that integrates OpenVDB, enabling advanced 3D localization capabilities. Currently, this extension uses OpenVDB to efficiently process 3D maps and pointcloud data.
🔰 Mapping
BelugaVDB requires level-set maps in vdb
format in order to work properly. VDB maps can be generated using suitables third party packages such as VDB Mapping, but the resulting map must be converted to a level-set map.
A simple post-processing code for adapting a map generated by VDB Mapping into a vdb
level-set map is shown below:
#include <openvdb/openvdb.h>
#include <openvdb/tools/TopologyToLevelSet.h>
int main()
{
openvdb::initialize();
// Create a VDB file object.
openvdb::io::File file("vdb_mapping_map.vdb");
// Open the file. This reads the file header, but not any grids.
file.open();
// Print the names of the grid
for (openvdb::io::File::NameIterator nameIter = file.beginName(); nameIter != file.endName(); ++nameIter)
{
std::cout << "Grid name: " << nameIter.gridName() << std::endl;
}
// Retrieve a shared pointer
openvdb::GridBase::Ptr baseGrid;
baseGrid = file.readGrid("[0]");
// Close the file
file.close();
// Cast the generic grid pointer to a FloatGrid pointer.
openvdb::FloatGrid::Ptr grid = openvdb::gridPtrCast<openvdb::FloatGrid>(baseGrid);
// Transform to level set
openvdb::FloatGrid::Ptr grid_levelset = nullptr;
grid_levelset = openvdb::tools::topologyToLevelSet(*grid, 3, 1, 0, 0);
// Save new grid
openvdb::io::File("levle_set_map.vdb").write({grid_levelset});
}
Also, vdb
level-set maps can be generated from pcd
maps (created from SLAM libraries such as FAST-LIO).
A simple code to generate a vdb
level-set map from a pcd
file is shown below:
```cpp #include <openvdb/openvdb.h> #include <openvdb/tree/Tree.h> #include <openvdb/tools/TopologyToLevelSet.h> #include <openvdb/math/Transform.h>
#include <pcl/io/pcd_io.h> #include <pcl/point_types.h>
#include
int main() { openvdb::initialize();
pcl::PointCloud<pcl::PointXYZ>::Ptr cloud (new pcl::PointCloud<pcl::PointXYZ>);
// Open PCD file
if (pcl::io::loadPCDFile<pcl::PointXYZ> ("map.pcd", *cloud) == -1) //* load the file
{
PCL_ERROR ("Couldn't read file map.pcd \n");
return (-1);
}
std::cout << "Loaded cloud succesfuly"<< std::endl;
// Create VDB grid of resolution 0.5
openvdb::FloatGrid::Ptr grid = openvdb::FloatGrid::create();
grid->setTransform(openvdb::math::Transform::createLinearTransform(0.5));
grid->setGridClass(openvdb::GRID_LEVEL_SET);
// Get an accessor for coordinate-based access to voxels.
openvdb::FloatGrid::Accessor accessor = grid->getAccessor();
// Fill the grid
for (const auto& point: *cloud)
{
// World coordinates
openvdb::Vec3f world_vect(point.x, point.y, point.z);
// Transform to index world
openvdb::math::Transform transform;
openvdb::math::Coord ijk = transform.worldToIndexCellCentered(world_vect);
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged beluga_vdb at Robotics Stack Exchange
![]() |
beluga_vdb package from beluga repobeluga beluga_amcl beluga_benchmark beluga_example beluga_ros beluga_system_tests beluga_tools beluga_tutorial beluga_vdb |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 1.0.0 |
License | Apache License 2.0 |
Build type | CMAKE |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/Ekumen-OS/beluga.git |
VCS Type | git |
VCS Version | main |
Last Updated | 2025-04-24 |
Dev Status | DEVELOPED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Gerardo Puga
- Ivan Paunovic
- Nahuel Espinosa
Authors
Beluga VDB
🌐 Overview
BelugaVDB is a library extension for beluga
that integrates OpenVDB, enabling advanced 3D localization capabilities. Currently, this extension uses OpenVDB to efficiently process 3D maps and pointcloud data.
🔰 Mapping
BelugaVDB requires level-set maps in vdb
format in order to work properly. VDB maps can be generated using suitables third party packages such as VDB Mapping, but the resulting map must be converted to a level-set map.
A simple post-processing code for adapting a map generated by VDB Mapping into a vdb
level-set map is shown below:
#include <openvdb/openvdb.h>
#include <openvdb/tools/TopologyToLevelSet.h>
int main()
{
openvdb::initialize();
// Create a VDB file object.
openvdb::io::File file("vdb_mapping_map.vdb");
// Open the file. This reads the file header, but not any grids.
file.open();
// Print the names of the grid
for (openvdb::io::File::NameIterator nameIter = file.beginName(); nameIter != file.endName(); ++nameIter)
{
std::cout << "Grid name: " << nameIter.gridName() << std::endl;
}
// Retrieve a shared pointer
openvdb::GridBase::Ptr baseGrid;
baseGrid = file.readGrid("[0]");
// Close the file
file.close();
// Cast the generic grid pointer to a FloatGrid pointer.
openvdb::FloatGrid::Ptr grid = openvdb::gridPtrCast<openvdb::FloatGrid>(baseGrid);
// Transform to level set
openvdb::FloatGrid::Ptr grid_levelset = nullptr;
grid_levelset = openvdb::tools::topologyToLevelSet(*grid, 3, 1, 0, 0);
// Save new grid
openvdb::io::File("levle_set_map.vdb").write({grid_levelset});
}
Also, vdb
level-set maps can be generated from pcd
maps (created from SLAM libraries such as FAST-LIO).
A simple code to generate a vdb
level-set map from a pcd
file is shown below:
```cpp #include <openvdb/openvdb.h> #include <openvdb/tree/Tree.h> #include <openvdb/tools/TopologyToLevelSet.h> #include <openvdb/math/Transform.h>
#include <pcl/io/pcd_io.h> #include <pcl/point_types.h>
#include
int main() { openvdb::initialize();
pcl::PointCloud<pcl::PointXYZ>::Ptr cloud (new pcl::PointCloud<pcl::PointXYZ>);
// Open PCD file
if (pcl::io::loadPCDFile<pcl::PointXYZ> ("map.pcd", *cloud) == -1) //* load the file
{
PCL_ERROR ("Couldn't read file map.pcd \n");
return (-1);
}
std::cout << "Loaded cloud succesfuly"<< std::endl;
// Create VDB grid of resolution 0.5
openvdb::FloatGrid::Ptr grid = openvdb::FloatGrid::create();
grid->setTransform(openvdb::math::Transform::createLinearTransform(0.5));
grid->setGridClass(openvdb::GRID_LEVEL_SET);
// Get an accessor for coordinate-based access to voxels.
openvdb::FloatGrid::Accessor accessor = grid->getAccessor();
// Fill the grid
for (const auto& point: *cloud)
{
// World coordinates
openvdb::Vec3f world_vect(point.x, point.y, point.z);
// Transform to index world
openvdb::math::Transform transform;
openvdb::math::Coord ijk = transform.worldToIndexCellCentered(world_vect);
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged beluga_vdb at Robotics Stack Exchange
![]() |
beluga_vdb package from beluga repobeluga beluga_amcl beluga_benchmark beluga_example beluga_ros beluga_system_tests beluga_tools beluga_tutorial beluga_vdb |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 1.0.0 |
License | Apache License 2.0 |
Build type | CMAKE |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/Ekumen-OS/beluga.git |
VCS Type | git |
VCS Version | main |
Last Updated | 2025-04-24 |
Dev Status | DEVELOPED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Gerardo Puga
- Ivan Paunovic
- Nahuel Espinosa
Authors
Beluga VDB
🌐 Overview
BelugaVDB is a library extension for beluga
that integrates OpenVDB, enabling advanced 3D localization capabilities. Currently, this extension uses OpenVDB to efficiently process 3D maps and pointcloud data.
🔰 Mapping
BelugaVDB requires level-set maps in vdb
format in order to work properly. VDB maps can be generated using suitables third party packages such as VDB Mapping, but the resulting map must be converted to a level-set map.
A simple post-processing code for adapting a map generated by VDB Mapping into a vdb
level-set map is shown below:
#include <openvdb/openvdb.h>
#include <openvdb/tools/TopologyToLevelSet.h>
int main()
{
openvdb::initialize();
// Create a VDB file object.
openvdb::io::File file("vdb_mapping_map.vdb");
// Open the file. This reads the file header, but not any grids.
file.open();
// Print the names of the grid
for (openvdb::io::File::NameIterator nameIter = file.beginName(); nameIter != file.endName(); ++nameIter)
{
std::cout << "Grid name: " << nameIter.gridName() << std::endl;
}
// Retrieve a shared pointer
openvdb::GridBase::Ptr baseGrid;
baseGrid = file.readGrid("[0]");
// Close the file
file.close();
// Cast the generic grid pointer to a FloatGrid pointer.
openvdb::FloatGrid::Ptr grid = openvdb::gridPtrCast<openvdb::FloatGrid>(baseGrid);
// Transform to level set
openvdb::FloatGrid::Ptr grid_levelset = nullptr;
grid_levelset = openvdb::tools::topologyToLevelSet(*grid, 3, 1, 0, 0);
// Save new grid
openvdb::io::File("levle_set_map.vdb").write({grid_levelset});
}
Also, vdb
level-set maps can be generated from pcd
maps (created from SLAM libraries such as FAST-LIO).
A simple code to generate a vdb
level-set map from a pcd
file is shown below:
```cpp #include <openvdb/openvdb.h> #include <openvdb/tree/Tree.h> #include <openvdb/tools/TopologyToLevelSet.h> #include <openvdb/math/Transform.h>
#include <pcl/io/pcd_io.h> #include <pcl/point_types.h>
#include
int main() { openvdb::initialize();
pcl::PointCloud<pcl::PointXYZ>::Ptr cloud (new pcl::PointCloud<pcl::PointXYZ>);
// Open PCD file
if (pcl::io::loadPCDFile<pcl::PointXYZ> ("map.pcd", *cloud) == -1) //* load the file
{
PCL_ERROR ("Couldn't read file map.pcd \n");
return (-1);
}
std::cout << "Loaded cloud succesfuly"<< std::endl;
// Create VDB grid of resolution 0.5
openvdb::FloatGrid::Ptr grid = openvdb::FloatGrid::create();
grid->setTransform(openvdb::math::Transform::createLinearTransform(0.5));
grid->setGridClass(openvdb::GRID_LEVEL_SET);
// Get an accessor for coordinate-based access to voxels.
openvdb::FloatGrid::Accessor accessor = grid->getAccessor();
// Fill the grid
for (const auto& point: *cloud)
{
// World coordinates
openvdb::Vec3f world_vect(point.x, point.y, point.z);
// Transform to index world
openvdb::math::Transform transform;
openvdb::math::Coord ijk = transform.worldToIndexCellCentered(world_vect);
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged beluga_vdb at Robotics Stack Exchange
![]() |
beluga_vdb package from beluga repobeluga beluga_amcl beluga_benchmark beluga_example beluga_ros beluga_system_tests beluga_tools beluga_tutorial beluga_vdb |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 1.0.0 |
License | Apache License 2.0 |
Build type | CMAKE |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/Ekumen-OS/beluga.git |
VCS Type | git |
VCS Version | main |
Last Updated | 2025-04-24 |
Dev Status | DEVELOPED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Gerardo Puga
- Ivan Paunovic
- Nahuel Espinosa
Authors
Beluga VDB
🌐 Overview
BelugaVDB is a library extension for beluga
that integrates OpenVDB, enabling advanced 3D localization capabilities. Currently, this extension uses OpenVDB to efficiently process 3D maps and pointcloud data.
🔰 Mapping
BelugaVDB requires level-set maps in vdb
format in order to work properly. VDB maps can be generated using suitables third party packages such as VDB Mapping, but the resulting map must be converted to a level-set map.
A simple post-processing code for adapting a map generated by VDB Mapping into a vdb
level-set map is shown below:
#include <openvdb/openvdb.h>
#include <openvdb/tools/TopologyToLevelSet.h>
int main()
{
openvdb::initialize();
// Create a VDB file object.
openvdb::io::File file("vdb_mapping_map.vdb");
// Open the file. This reads the file header, but not any grids.
file.open();
// Print the names of the grid
for (openvdb::io::File::NameIterator nameIter = file.beginName(); nameIter != file.endName(); ++nameIter)
{
std::cout << "Grid name: " << nameIter.gridName() << std::endl;
}
// Retrieve a shared pointer
openvdb::GridBase::Ptr baseGrid;
baseGrid = file.readGrid("[0]");
// Close the file
file.close();
// Cast the generic grid pointer to a FloatGrid pointer.
openvdb::FloatGrid::Ptr grid = openvdb::gridPtrCast<openvdb::FloatGrid>(baseGrid);
// Transform to level set
openvdb::FloatGrid::Ptr grid_levelset = nullptr;
grid_levelset = openvdb::tools::topologyToLevelSet(*grid, 3, 1, 0, 0);
// Save new grid
openvdb::io::File("levle_set_map.vdb").write({grid_levelset});
}
Also, vdb
level-set maps can be generated from pcd
maps (created from SLAM libraries such as FAST-LIO).
A simple code to generate a vdb
level-set map from a pcd
file is shown below:
```cpp #include <openvdb/openvdb.h> #include <openvdb/tree/Tree.h> #include <openvdb/tools/TopologyToLevelSet.h> #include <openvdb/math/Transform.h>
#include <pcl/io/pcd_io.h> #include <pcl/point_types.h>
#include
int main() { openvdb::initialize();
pcl::PointCloud<pcl::PointXYZ>::Ptr cloud (new pcl::PointCloud<pcl::PointXYZ>);
// Open PCD file
if (pcl::io::loadPCDFile<pcl::PointXYZ> ("map.pcd", *cloud) == -1) //* load the file
{
PCL_ERROR ("Couldn't read file map.pcd \n");
return (-1);
}
std::cout << "Loaded cloud succesfuly"<< std::endl;
// Create VDB grid of resolution 0.5
openvdb::FloatGrid::Ptr grid = openvdb::FloatGrid::create();
grid->setTransform(openvdb::math::Transform::createLinearTransform(0.5));
grid->setGridClass(openvdb::GRID_LEVEL_SET);
// Get an accessor for coordinate-based access to voxels.
openvdb::FloatGrid::Accessor accessor = grid->getAccessor();
// Fill the grid
for (const auto& point: *cloud)
{
// World coordinates
openvdb::Vec3f world_vect(point.x, point.y, point.z);
// Transform to index world
openvdb::math::Transform transform;
openvdb::math::Coord ijk = transform.worldToIndexCellCentered(world_vect);
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged beluga_vdb at Robotics Stack Exchange
![]() |
beluga_vdb package from beluga repobeluga beluga_amcl beluga_benchmark beluga_example beluga_ros beluga_system_tests beluga_tools beluga_tutorial beluga_vdb |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 1.0.0 |
License | Apache License 2.0 |
Build type | CMAKE |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/Ekumen-OS/beluga.git |
VCS Type | git |
VCS Version | main |
Last Updated | 2025-04-24 |
Dev Status | DEVELOPED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Gerardo Puga
- Ivan Paunovic
- Nahuel Espinosa
Authors
Beluga VDB
🌐 Overview
BelugaVDB is a library extension for beluga
that integrates OpenVDB, enabling advanced 3D localization capabilities. Currently, this extension uses OpenVDB to efficiently process 3D maps and pointcloud data.
🔰 Mapping
BelugaVDB requires level-set maps in vdb
format in order to work properly. VDB maps can be generated using suitables third party packages such as VDB Mapping, but the resulting map must be converted to a level-set map.
A simple post-processing code for adapting a map generated by VDB Mapping into a vdb
level-set map is shown below:
#include <openvdb/openvdb.h>
#include <openvdb/tools/TopologyToLevelSet.h>
int main()
{
openvdb::initialize();
// Create a VDB file object.
openvdb::io::File file("vdb_mapping_map.vdb");
// Open the file. This reads the file header, but not any grids.
file.open();
// Print the names of the grid
for (openvdb::io::File::NameIterator nameIter = file.beginName(); nameIter != file.endName(); ++nameIter)
{
std::cout << "Grid name: " << nameIter.gridName() << std::endl;
}
// Retrieve a shared pointer
openvdb::GridBase::Ptr baseGrid;
baseGrid = file.readGrid("[0]");
// Close the file
file.close();
// Cast the generic grid pointer to a FloatGrid pointer.
openvdb::FloatGrid::Ptr grid = openvdb::gridPtrCast<openvdb::FloatGrid>(baseGrid);
// Transform to level set
openvdb::FloatGrid::Ptr grid_levelset = nullptr;
grid_levelset = openvdb::tools::topologyToLevelSet(*grid, 3, 1, 0, 0);
// Save new grid
openvdb::io::File("levle_set_map.vdb").write({grid_levelset});
}
Also, vdb
level-set maps can be generated from pcd
maps (created from SLAM libraries such as FAST-LIO).
A simple code to generate a vdb
level-set map from a pcd
file is shown below:
```cpp #include <openvdb/openvdb.h> #include <openvdb/tree/Tree.h> #include <openvdb/tools/TopologyToLevelSet.h> #include <openvdb/math/Transform.h>
#include <pcl/io/pcd_io.h> #include <pcl/point_types.h>
#include
int main() { openvdb::initialize();
pcl::PointCloud<pcl::PointXYZ>::Ptr cloud (new pcl::PointCloud<pcl::PointXYZ>);
// Open PCD file
if (pcl::io::loadPCDFile<pcl::PointXYZ> ("map.pcd", *cloud) == -1) //* load the file
{
PCL_ERROR ("Couldn't read file map.pcd \n");
return (-1);
}
std::cout << "Loaded cloud succesfuly"<< std::endl;
// Create VDB grid of resolution 0.5
openvdb::FloatGrid::Ptr grid = openvdb::FloatGrid::create();
grid->setTransform(openvdb::math::Transform::createLinearTransform(0.5));
grid->setGridClass(openvdb::GRID_LEVEL_SET);
// Get an accessor for coordinate-based access to voxels.
openvdb::FloatGrid::Accessor accessor = grid->getAccessor();
// Fill the grid
for (const auto& point: *cloud)
{
// World coordinates
openvdb::Vec3f world_vect(point.x, point.y, point.z);
// Transform to index world
openvdb::math::Transform transform;
openvdb::math::Coord ijk = transform.worldToIndexCellCentered(world_vect);
File truncated at 100 lines see the full file