Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there an optimized way to visualize voxel grids/ octrees? #528

Open
Chimera-AI opened this issue Jan 22, 2022 · 2 comments
Open

Is there an optimized way to visualize voxel grids/ octrees? #528

Chimera-AI opened this issue Jan 22, 2022 · 2 comments

Comments

@Chimera-AI
Copy link

Dear devs,

Is there a way to add voxel grid / octree support in your viewer?
Currently, I use the polygon primitive to wrap a pointcloud representation of voxel grids by cubes to show a it. Basically my points are centroids of the voxel grid.
However, as you might also figure out, this naive approach gets very slow as the size of pointclouds increase.
A native support for adding more shape options for points might work a voxel volume will just surround the point centers for an octree.
Clients can always convert their original pointclouds into desired voxel grid/ octree and then create a sparse pointcloud with each point representing the centroid.
I feel that for a 3D viewer, that aims to be visualize data for autonomous driving will benefit a lot from a voxel grid / octree viewer.

@Chimera-AI Chimera-AI changed the title Way to visualize voxel grids/ octrees Is there an optimized way to visualize voxel grids/ octrees? Jan 22, 2022
@tim-wojo
Copy link
Contributor

This has come up before, but we need a dataset to drive a custom layer first and then we can refine the spec for the data and work on a default implementation.

I'm not sure I follow your point-cloud to voxel use-case, it sounds like your talking about quantizing the PC data into a voxel grid, and then using voxels as a clear representation that it covers not just a point but a volume?

I would be curious on a more detailed proposal. I'm thinking it would have to account for some parameters to the voxel space such as it's fixed origin (assuming it would be fixed such that we have a stable grid over time), and some parameters to the space (how big each voxel is), such that it could represent various depths. Those may be obvious, but ideally a proposal and example would explicitly cover such cases.

@Chimera-AI
Copy link
Author

Chimera-AI commented Feb 6, 2022

Hi Tim,

You are correct in your understanding. You can quantize your pointclouds into voxel grids for example, The library open3D has utilities to convert pointclouds to grids for example.

The biggest usecase will be to display an occupancy grid/map which is created from a raw point cloud. Algorithm like octomap is one such example...

An octomap will take a dense point cloud (from 3D rgbd sensors) or a conventional pointcloud from LiDARs and will create an occupancy grid. Usual parameters will be resolution ie size of the voxel as well as the world size. There are many 3D datasets available online. Even KITTI has pointclouds that can be used to create occupancy grids.

The handling of origin is exactly same as a pointcloud. You can have a fixed origin, or you can have a relative origin moving with your sensor.

Current way of achieving a voxel grid in streetscape is by having a quantized point cloud where every point is a voxel centroid. Then use the polygon objects to create a voxel cube around that. However this process will not scale well if the pointcloud is dense.

An easy solution to this is to just allow points to be represented as cubes natively with some specified dimensions.
Currently, points in streetscape has a radius property. Giving a shape property, or supporting a cube primitive will be relatively easy to have.

The application developers can then just use those primitives to display their output by performing the display calculations on their side and just streaming the final voxel centers. We do exactly that but currently need to stream all the polygons as well which slows the display a lot. We acheive 30 FPS of display performance in streetscape on a normal quantized pointcloud which drops down to 10 FPS when streaming cubes around these points. Representing a voxel grid as one will be much helpful than displaying it using pointclouds as it doesnot help us in separating true holes with the fake ones.

I am on vacation currently, but can soon provide you some visual examples if you need.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants