ethz-asl / voxblox_ground_truth

Create ground truth voxblox maps from Gazebo worlds or .ply files
BSD 2-Clause "Simplified" License
86 stars 24 forks source link

How to deal with output TSDF files? #15

Closed RuslanAgishev closed 3 years ago

RuslanAgishev commented 3 years ago

Could you please provide an example of how to access the data in resultant TSDF representations? Should it be done with the voxblox library?

victorreijgwart commented 3 years ago

Hi @RuslanAgishev, yes it's meant to be used with the voxblox library and I'd recommend this approach. Strictly speaking, the map files are serialized with protobuf so you could also try to read the data directly using its C++ or python bindings. If you want to do this, let me know. Then I'll share some links to voxblox's deserialization code with you for reference.

RuslanAgishev commented 3 years ago

Hello @victorreijgwart! Thank you for the response. What I would like to achieve is to obtain a point cloud or mesh (one .dae, .ply or .obj file for example) ground truth representation from the Gazebo world. It seems to me that it is possible to do this using the tools from voxblox. However, I am struggling to correctly interpret the output of the voxblox_ground_truth package. A python example of how to publish the data from TSDF files as voxels or meshes would be of great help. Thank you for sharing the project!

victorreijgwart commented 3 years ago

To convert the .tsdf file generated by the voxblox_ground_truth package to a .ply mesh, you can set voxblox's mesh_filename parameter to the output path where you want the mesh to be saved, then launch voxblox, call its load_map service to load the .tsdf file followed by the generate_mesh service to convert and save it. Both services are documented here.

RuslanAgishev commented 3 years ago

It works. Thank you again!