Extracting free space from an occupancy grid map in MATLAB
How can I extract free space from an occupancy grid map in MATLAB? I have the following code, which reports that there are no free cells in the occupancy grid map. clc; clear; close all; rng(1); % read the PCD file as pointcloud ptCloud = pcread("my.pcd"); % rotate pointcloud (optional) rotationAngles = [0.0, 0.0, 0.0]; translation = [0.0, 0.0, 0.0]; tform = rigidtform3d(rotationAngles,translation); ptCloud = pctransform(ptCloud,tform); % create occupancy grid using point cloud map3D = occupancyMap3D(3); map3D.FreeThreshold = 0.5; pose = [0.0 0.0 0.0 1.0 0.0 0.0 0.0]; maxRange = 15; insertPoin
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.