%% Obtain Range and Bearing Readings
% Create a range-bearing sensor.

 rbsensor = rangeSensor;

% Specify the pose of the sensor and the ground-truth map.

truePose = [0 0 pi/4];
trueMap = binaryOccupancyMap(eye(10));

%   Generate the sensor readings.

[ranges, angles] = rbsensor(truePose, trueMap);

% Visualize the results using lidarScan.

scan = lidarScan(ranges, angles);
figure
plot(scan)

% Copyright 2019 The MathWorks, Inc.