How to parse an octree_msg

4 vues (au cours des 30 derniers jours)
Francesco Lamonaca
Francesco Lamonaca le 19 Avr 2020
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?

Réponses (1)

Cam Salzberger
Cam Salzberger le 20 Avr 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

Catégories

En savoir plus sur Publishers and Subscribers dans Help Center et File Exchange

Produits


Version

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by