How to create a 3D occupancy map?

Illustration
Shubham Kalpande - 2023-01-28T14:01:26+00:00
Question: How to create a 3D occupancy map?

I want to create a 3D occupancy map to model a region where I want to test some path planning algorithms for an UAV. The matlab function requires some points and sensor pose to create the map, The example is poorly written and I am not able to understand how can I control the height, width and breadth of the buildings. Can some please detail the process of map creation perhaps for the following figure from MATLAB example? It shows various building with varying dimensions, I want to know how can I create this data file.    

Expert Answer

Profile picture of John Williams John Williams answered . 2025-11-20

This way, through surf plot?: I have shown with random test data. You may adjust the colors of the pattern/area 

 

data=zeros(500,500);
data(100:300,100:300)=10;
data(300:400,300:400)=20;
fig=surf(data);
set(fig,'LineStyle','none');
axis tight;

3d occupancy map

Note: Theare is a function in Matlab as occupancymap


Not satisfied with the answer ?? ASK NOW

Get a Free Consultation or a Sample Assignment Review!