How to parse an octree_msg
4 views (last 30 days)
Show older comments
Hi everyone! I'm having some troubles in finding how to parse an octree_msg and learning the tree structure. I have this variable:
I did not create it, but it was given to me by other. They said that it is based on the data taken from this source. Now the Data field is an array of values, how can I convert it to the tree structure? How can I understand which is the root and what node is the child of which node?
0 Comments
Answers (1)
Cam Salzberger
on 20 Apr 2020
Hello Francesco,
If you would like to write your own Octomap data interpreter, you would probably need to rewrite a fair bit of the octomap ROS package source code. I think the leaf_iterator may be a place to start?
However, if you have Navigation Toolbox, you can simply use the readOccupancyMap3D method on the message to convert to an occupancyMap3D object, which will probably be much easier to interpret and use.
-Cam
0 Comments
See Also
Categories
Find more on Publishers and Subscribers in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!