Ask Your Question
0

Octomap ERROR: Filestream to not open, nothing read

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

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 -0600

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

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

Seen: 167 times

Last updated: Nov 12 '20