Main Content

readOccupancyMap3D

(To be removed) Read 3-D map from Octomap ROS message

Since R2021a

readOccupancyMap3D will be removed in a future release. Use rosReadOccupancyMap3D (ROS Toolbox) instead. For more information, see ROS Message Structure Functions.

Description

map = readOccupancyMap3D(msg) reads the data inside a ROS 'octomap_msgs/Octomap' message to return an occupancyMap3D object. All message data values are converted to probabilities from 0 to 1.

Input Arguments

collapse all

Octomap ROS message, specified as a structure of message type 'octomap_msgs/Octomap'. Get this message by subscribing to an 'octomap_msgs/Octomap' topic using rossubscriber (ROS Toolbox) on a live ROS network or by creating your own message using rosmessage (ROS Toolbox).

Output Arguments

collapse all

3-D occupancy map, returned as an occupancyMap3D object handle.

Version History

Introduced in R2021a

collapse all

R2021a: ROS Message Structure Functions

You can now create messages as structures with fields matching the message object properties. Using structures typically improves performance of creating, updating, and using ROS messages, but message fields are no longer validated when set. Message types and corresponding field values from the structures are validated when sent across the network.

To support message structures as inputs, new functions that operate on specialized ROS messages have been provided. These new functions are based on the existing object functions of message objects, but support ROS and ROS 2 message structures as inputs instead of message objects.

The object functions will be removed in a future release.

Message TypesObject Function NameNew Function Name

Image

CompressedImage

readImage

writeImage

rosReadImage (ROS Toolbox)

rosWriteImage (ROS Toolbox)

LaserScan

readCartesian

readScanAngles

lidarScan

plot

rosReadCartesian (ROS Toolbox)

rosReadScanAngles (ROS Toolbox)

rosReadLidarScan (ROS Toolbox)

rosPlot (ROS Toolbox)

PointCloud2

apply

readXYZ

readRGB

readAllFieldNames

readField

scatter3

rosApplyTransform (ROS Toolbox)

rosReadXYZ (ROS Toolbox)

rosReadRGB (ROS Toolbox)

rosReadAllFieldNames (ROS Toolbox)

rosReadField (ROS Toolbox)

rosPlot (ROS Toolbox)

QuaternionreadQuaternion

rosReadQuaternion (ROS Toolbox)

OccupancyGrid

readBinaryOccupanyGrid

readOccupancyGrid

writeBinaryOccupanyGrid

writeOccupanyGrid

rosReadOccupancyGrid (ROS Toolbox)

rosReadBinaryOccupancyGrid (ROS Toolbox)

rosReadOccupancyGrid (ROS Toolbox)

rosWriteBinaryOccupancyGrid (ROS Toolbox)

rosWriteOccupancyGrid (ROS Toolbox)

OctomapreadOccupancyMap3D

rosReadOccupancyMap3D (ROS Toolbox)

PointStamped

PoseStamped

QuaternionStamped

Vector3Stamped

TransformStamped

apply

rosApplyTransform (ROS Toolbox)

All messagesshowdetails

rosShowDetails (ROS Toolbox)

See Also

| (ROS Toolbox) | (ROS Toolbox)