I have a callback function to handle octomap_msgs::Octomap messages. It will receive a message and convert it into octomap::ColorOcTree object then write it to local.
I found when I convert the message to octomap::ColorOcTree pointer and write it to file, the color of the octomap is correct. But when I dereference it and write the object to file, all the color drops. I'm wondering if there is any proper way to dereference pointer to octomap::ColorOcTree object?
Hi,
I have a callback function to handle octomap_msgs::Octomap messages. It will receive a message and convert it into octomap::ColorOcTree object then write it to local.
I found when I convert the message to octomap::ColorOcTree pointer and write it to file, the color of the octomap is correct. But when I dereference it and write the object to file, all the color drops. I'm wondering if there is any proper way to dereference pointer to octomap::ColorOcTree object?
The callback function is like
The 're_path1' and 're_path2' are two std::string to specify the paths to save the octomap files
The octomap saved by pointer is like![image](https://github.com/OctoMap/octomap/assets/57505064/401be55a-455b-4c6b-acbe-c2e52bb0032c)
The octomap saved by object is like![image](https://github.com/OctoMap/octomap/assets/57505064/45347459-6e3d-41d8-8ea2-ea49b963c564)