How to create octomap tree from mesh

I was looking for a way to create an octomap tree from arbitrary mesh file. Well at first I tried to convert my data into PCL pointcloud and then convert them into an octomap tree. But the problem was, for instance when you a cuboid mesh, you only have 8 vertex, which gives you 8 point and the walls between them won’t appear in the final octomap tree. So I found the following solution:

1) First, download the latest version of binvox from  http://www.patrickmin.com/binvox/ (more about binvox, source code available here or you can try this)
2) Convert you mesh file into binvox file i.e

3) grab the binvox2bt.cpp from octomap at GitHub and compile it, then

4) visualize the bt file install octovis:

then:

mesh file (Dude.ply).

octomap bt file (Dude.binvox.bt).

The sample file can be downloaded at Dude.ply, Dude.binvox.bt.

 

0 0 votes
Article Rating
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

2 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
h66
h66
4 years ago

Thanks! This helped a lot, I didn’t known about binvox.

2
0
Would love your thoughts, please comment.x
()
x