Ask Your Question

Tenrampi's profile - activity

2017-07-25 16:29:33 -0600 received badge  Student (source)
2017-07-03 00:48:57 -0600 received badge  Popular Question (source)
2017-07-03 00:48:57 -0600 received badge  Notable Question (source)
2017-07-03 00:48:57 -0600 received badge  Famous Question (source)
2016-12-07 09:17:11 -0600 asked a question problem publishing octomap msg from an octomap file

Hello, I have a .bt file and would like to publish an octomap_msg that you can visualize in rviz.

i wrote the following node:

ros::Publisher octomap_pub = n.advertise<octomap_msgs::Octomap>("octomap_loaded", 1);
octomap_msgs::Octomap octomap;
octomap::OcTree myOctomap("fr_079.bt");
octomap_msgs::binaryMapToMsg(myOctomap, octomap);
pub_octomap.publish(octomap);

and i can visualize the topic "octomap_loaded" but when i try to visualize it in rviz using the occupancygrid under "status" i have the following message:

0 binary octomap messages received

What am I doing wrong? The message contains the publish octomap because I tried to save the contents to a file using myOctomap.writeBinary("map.bt"); and actually I create the same amount .bt file.

Thank You