Points in 3D occupancy Grid are classified as free
2 ビュー (過去 30 日間)
古いコメントを表示
Hi,
After building the 3D occupnacy grid (occupancyMap3D) I get the following map (the red trajectory is the vehicle's trajectory):
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/951019/image.png)
when zooming in on a specific point on the map:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/951024/image.png)
I choose (randomly) the points [472, -86, 7] which is expected to be occupied according to the map.
but when I test for occupancy:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/951029/image.png)
which means the point is classified as free...
What am I missing here?
Thanks
0 件のコメント
採用された回答
Sandip Kumar
2022 年 4 月 4 日
Please note the voxels are drawn around a center which is occupied, when you select you might be at the edge of the voxel, which might be accounted with the neighboring voxel which would be free.
A better way would be to checkOccupancy for multiple points around the area of interest, with a code something on these lines:
resolution = 0.5; % or the right resolution for your map
[X,Y,Z] = meshgrid(-resolution:resolution:resolution, ...
-resolution:resolution:resolution, ...
-resolution:resolution:resolution);
ptsOfInterest = [X(:) Y(:) Z(:)] + [ 472 -86 7 ]; % use the point of interest around which you want data
checkOccupancy(map3D,ptsOfInterest)
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Point Cloud Processing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!