Main Content


Read 3-D map from ROS or ROS 2 Octomap message structure

Since R2021a


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

Input Arguments

collapse all

ROS or ROS 2 'octomap_msgs/Octomap' message, specified as a message structure. Get this message by subscribing to an 'octomap_msgs/Octomap' topic using rossubscriber or ros2subscriber on a live ROS or ROS 2 network, respectively. You can also create your own message using rosmessage or ros2message.

Output Arguments

collapse all

3-D occupancy map, returned as an occupancyMap3D (Navigation Toolbox) object handle.

Version History

Introduced in R2021a