472,795 Members | 2,441 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,795 software developers and data experts.

Efficient implementation of spatial occupancy grid

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<doubleand 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
Feb 13 '08 #1
2 4050
On Feb 13, 8:38*am, "Marco Körner" <marcokoer...@gmx.dewrote:
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<doubleand 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
Feb 13 '08 #2
Hi Saul,

thank you for your reply.

On 13 Feb., 13:18, shaz...@gmail.com wrote:
On Feb 13, 8:38*am, "Marco Körner" <marcokoer...@gmx.dewrote:>
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.
Yes, normally it does. I would like to implement a probabilistic
approach, so every grid element is initialized with probability 0.5.
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<doubleand 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)?
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.
Feb 13 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Michele Locati | last post by:
Hello NG! I'm going to use MySQL to manage spatial data in a website made with PHP. In its manual I've seen that MySQL can manage georeferenced elements (points, lines and so on). But this...
0
by: Kiyoung Yang | last post by:
Hi, I'm using Oracle 9i with the spatial option. It seems that the spatial function, e.g., SDO_NN, does not consider the 3rd element in a point. I tried the following script to create a table,...
0
by: Gijsbert Noordam | last post by:
------_=_NextPart_001_01C349DA.E4B7E120 Content-Type: text/plain; charset="iso-8859-1" Hi, As a newcomer to this mailing list -- and to the MySQL database environment -- my main field of...
2
by: Belinda | last post by:
Hi. I am just getting started with DB2's spatial extender and could really use some help. Pointers to good docs or examples are welcome. I am using DB2 version 8 on Sun. I have a database of...
2
by: peter.prib | last post by:
Hi, I am having trouble getting DB2 to select an index I have created for a spatial location. Table definition create table gps_paf_address ( gnaf_address gnaf_address not null...
11
by: Brad | last post by:
To DB2 Personal Developer Edition GIS users: How do I acquire a spatial extender license key for the DB2 PDE? I expected to be able to use it right out of the box. Brad
1
by: vasilip | last post by:
I'm testing out db2 for a project I'm starting that requires proper xml support and I can't seem to get both xml and spatial data to work well in the same table. Once having created a table...
3
by: san1014 | last post by:
hi all, Iam new to Oracle Spatial iam using JBO:Oracle spatial data viewer to display the shape files of the polygons. iam able to get the manually but iam unable to display the polygon...
1
by: yneeraja | last post by:
hi all, Iam new to oracle spatial please suggest me an open source for displaying the .shp files ie spatial data using purely java swing and oracle. please help me out . thanks in advance.
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.