ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

octmap seems to expect the file to already be open. Presumably, you can open it by doing the following (The file may need to be an absolute path. )

std::ifstream if_File;
if_File.open("obstaclecourse2.ot");
AbstractOcTree* tree = AbstractOcTree::read("obstaclecourse2.ot");

ref: https://github.com/OctoMap/octomap/blob/a3f38090619d949bcafe82201881acf985d39b00/octomap/src/AbstractOcTree.cpp#L77