Ask Your Question

Revision history [back]

You can use octomap_server with your .ot file as an argument, that will load the map from file and publish it not only as an octomap but also as occupancy grid in ROS. As mentioned in the Wiki documentation, you just have to listen to the projected_map topic and there are various parameters you can set to your liking (such as minimum and maximum height of the map to consider for the projection).

Otherwise you can follow Stefan's advice and write your own map projection. Create an Octree-Iterator (as described in the OctoMap documentation, check for each node if it's occupied, and then set the corresponding coordinate in your map to occupied or free.