%% Write Binary Occupancy Map Information to ROS Message
% Create occupancy grid and message. Write the map onto the message.

map = binaryOccupancyMap(randi([0,1], 10));
msg = rosmessage('nav_msgs/OccupancyGrid');
writeBinaryOccupancyGrid(msg, map);

% Copyright 2019 The MathWorks, Inc.