void fetchOctomap(const octomap_msgs::OctomapConstPtr &msg){ ROS_INFO("Requesting the map from topic octomap_full"); while (!ros::service::call("octomap_full", request, response)) { ROS_WARN("OctoMap Server node not ready"); usleep(1000000); } AbstractOcTree* tree = octomap_msgs::fullMsgToMap(response.map); ROS_INFO("Map with %zu nodes received!!", tree->size()); }