MATLAB Answers

How to parse an octree_msg

2 views (last 30 days)
Francesco Lamonaca
Francesco Lamonaca on 19 Apr 2020
Answered: Cam Salzberger on 20 Apr 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?

  0 Comments

Sign in to comment.

Answers (1)

Cam Salzberger
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

Sign in to comment.

Products


Release

R2020a