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
1 |
./binvox -c Dude.ply |
3) grab the binvox2bt.cpp from octomap at GitHub and compile it, then
1 |
./binvox2bt Dude.binvox |
4) visualize the bt file install octovis:
1 |
sudo apt-get install ros-kinetic-octovis |
then:
1 |
./octovis Dude.binvox.bt |
The sample file can be downloaded at Dude.ply, Dude.binvox.bt.
Thanks! This helped a lot, I didn’t known about binvox.
I’m glad that you found my website useful, best of luck.