OccupancyGrid
(To be removed) Create occupancy grid message
OccupancyGrid object will be removed in a future release. Use message structure format
when you create ROS messages using the rosmessage function, by specifying the Dataformat
name-value argument as "struct". You can use rosReadBinaryOccupancyGrid, rosReadOccupancyGrid, rosWriteBinaryOccupancyGrid, and rosWriteOccupancyGrid functions to work with occupancy grid messages.
For more information, see ROS Message Structure Functions.
Description
The OccupancyGrid object is an implementation of the
nav_msgs/OccupancyGrid message type in ROS. The object contains
meta-information about the message and the occupancy grid data.
To create a binaryOccupancyMap (Robotics System Toolbox) object from a ROS
message, use the readBinaryOccupancyGrid function.
To create an occupancyMap (Navigation Toolbox) object , use the readOccupancyGrid function.
Creation
Description
msg = rosmessage('nav_msgs/OccupancyGrid'); creates
an empty OccupancyGrid object. To specify map information
and data, use the map.Info and
msg.Data properties. You can also get the occupancy
grid messages off the ROS network using rossubscriber.
Properties
Object Functions
readOccupancyGrid | (To be removed) Read occupancy grid message |
readBinaryOccupancyGrid | (To be removed) Read binary occupancy grid |
writeBinaryOccupancyGrid | (To be removed) Write values from grid to ROS message |
writeOccupancyGrid | (To be removed) Write values from grid to ROS message |
![Figure contains an axes object. The axes object with title Binary Occupancy Grid, xlabel X [meters], ylabel Y [meters] contains an object of type image.](../../examples/ros/win64/CreateOccupancyGridFrom2DMapExample_01.png)