%% Get Cartesian Coordinates from Laser Scan
%
% Connect to ROS network. Subscribe to a laser scan topic, and receive a message.

rosinit('192.168.17.129')
sub = rossubscriber('/scan');
scan = receive(sub);

%
% Read the Cartesian points from the laser scan. Plot the laser scan.

cart = readCartesian(scan);
plot(cart(:,1),cart(:,2))

%
% Shutdown ROS network.

rosshutdown

%
% Copyright 2019 The MathWorks, Inc.