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

Octomap ERROR: Filestream to not open, nothing read

asked 2020-11-10 22:04:07 -0500

ROS_Master007 gravatar image

I am using the following code to read an octomap.

AbstractOcTree* tree = AbstractOcTree::read("obstaclecourse2.ot");

However, I get the following error: ERROR: Filestream to obstaclecourse2.ot not open, nothing read.

I am able to visualize the map in octovis and I have also tried giving an absolute path to the file. Please let me know if anyone else has faced and solve a similar issue.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2020-11-12 05:30:11 -0500

miura gravatar image

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/bl...

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-11-10 21:55:50 -0500

Seen: 498 times

Last updated: Nov 12 '20