Efficient implementation of spatial occupancy grid

M

Marco Körner

Hello,

I'm working on mapping the car's environment by updating an occupancy
grid. An occupancy grid dicretizes the 3D space in small grid elements
(voxels). A grid element contains informations about the space it's
representing.

I need to map a space of the dimensions 50m * 5m * 3m with grid
elements of size 1cm * 1cm * cm (= 750 000 000 grid elements).

My question is how to implement such a data structure in an efficient
way. I need to access fast by indizes. Access by iterators is not
needed. The implentation has to be dynamic because of the iterative
mapping process.

My idea was to store all voxels in a long std::vector<double> and let
pointing a kd-tree's leafs on the vector elements. But this would have
the drawback that the kd-tree has to be reorganized during the update
process to avoid a degeneration to a linear list.

Does anybody has an other idea? Or exemplary code?

Best regards,

Marco Körner
 
S

shazled

I'm working on mapping the car's environment by updating an occupancy
grid. An occupancy grid dicretizes the 3D space in small grid elements
(voxels). A grid element contains informations about the space it's
representing.
I recently did something similar to this in 6D where I used my own
datastructures.
I need to map a space of the dimensions 50m * 5m * 3m with grid
elements of size 1cm * 1cm * cm (= 750 000 000 grid elements).
Does every element in the grid contain data? In my case they didn't,
and I found a sparse matrix was the best data structure to use.
My question is how to implement such a data structure in an efficient
way. I need to access fast by indizes. Access by iterators is not
needed. The implentation has to be dynamic because of the iterative
mapping process.
I'd consider a 3D matrix or 3D sparse matrix. I've not used them, but
google shows there are some free implementations.
My idea was to store all voxels in a long std::vector<double> and let
pointing a kd-tree's leafs on the vector elements. But this would have
the drawback that the kd-tree has to be reorganized during the update
process to avoid a degeneration to a linear list.
Are there any advantages to using a kd-tree that can't be done by
indexing a 3D matrix (this is a genuine question)?

Saul
 
M

Marco Körner

Hi Saul,

thank you for your reply.

I recently did something similar to this in 6D where I used my own
datastructures.


Does every element in the grid contain data? In my case they didn't,
and I found a sparse matrix was the best data structure to use.

Yes, normally it does. I would like to implement a probabilistic
approach, so every grid element is initialized with probability 0.5.
I'd consider a 3D matrix or 3D sparse matrix. I've not used them, but
google shows there are some free implementations.


Are there any advantages to using a kd-tree that can't be done by
indexing a 3D matrix (this is a genuine question)?

I don't know. My idea was to create a grid element if it's not
allready stored in the vector. The kd-tree would be used to find and
access each grid element in logarithmic time O(log N) instead of
search linear through the vector of grid elements in O(N). The
advantage would be, that I just manage cells I've previously touched.
Queries for all other grid elements would return the initial value.
 
Joined
May 30, 2008
Messages
1
Reaction score
0
grid

Hi i think i know what you want to do with this tree but can you please reffer me to some paper of how to get those cells using images?
so obvoiusly u do some estimation over each image but in what way?

thanks in advance,
Ran Z.
 

Members online

Forum statistics

Threads
473,997
Messages
2,570,241
Members
46,831
Latest member
RusselWill

Latest Threads

Top