How to parse an octree_msg

3 visualizaciones (últimos 30 días)
Francesco Lamonaca
Francesco Lamonaca el 19 de Abr. de 2020
Respondida: Cam Salzberger el 20 de Abr. de 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?

Respuestas (1)

Cam Salzberger
Cam Salzberger el 20 de Abr. de 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

Categorías

Más información sobre Publishers and Subscribers en Help Center y File Exchange.

Productos


Versión

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by