473,766 Members | 2,026 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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<dou bleand 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 4101
On Feb 13, 8:38*am, "Marco Körner" <marcokoer...@g mx.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<dou bleand 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.c om wrote:
On Feb 13, 8:38*am, "Marco Körner" <marcokoer...@g mx.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<dou bleand 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
1423
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 spatial extension stil lacks some functionality, and by a web search it seems to me that these functions are missing from year(s). What I need most is the DISTANCE() function beetween two geometric
0
5176
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, insert 2 points, create an index, and to query the table using SDO_NN. -------------------< script for Oracle >---------------------- create table test (shape MDSYS.SDO_GEOMETRY);
0
1611
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 interest is the use of Spatial data. Before I start dropping my questions (a have a few) all over this list, two quick ones to start with:
2
3154
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 genomic data and believe the spatial extender will help in querying. I have to do intersections, subtractions, proximity, etc of ranges in the chromosomes. The database and even some tables include data on all chromosomes of several species. I am...
2
2546
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 ,GNF_PID varchar(015) not null
11
3315
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
3515
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 containing both xml and spatial data fields I can't seem to find a way to alter the table I have created a table containing an id, xmldata field and a ST_Point If I try to drop the xml field with ALTER TABLE TEST DROP COLUMN
3
1690
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 there is a java file displayManager viz iam getting an error please check the code and answer me back here iam sending my code
1
1892
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.
0
10168
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10008
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9959
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9837
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8833
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7381
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6651
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5279
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5423
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.