%% Read Binary Occupancy Data from ROS Message
% Create a occupancy grid message and populate it with data.

msg = rosmessage('nav_msgs/OccupancyGrid');
msg.Info.Height = 10; 
msg.Info.Width = 10; 
msg.Info.Resolution = 0.1; 
msg.Data = 100*rand(100,1);

%
% Read data from message. Show the map.

map = readBinaryOccupancyGrid(msg);
show(map)

% Copyright 2012 The MathWorks, Inc.