naturerobots / mesh_navigation

Mesh Navigation Stack
BSD 3-Clause "New" or "Revised" License
511 stars 65 forks source link

HDF5 file creation / error when created using lvr2_hdf5_mesh_tool #20

Open k-becker opened 2 years ago

k-becker commented 2 years ago

Hi,

I tried to use this package, but have problems creating an own usable HDF5 file. With the example file "botanical_garden_osnabrueck.h5" from the pluto_robot package it worked as expected.

So I tried to recreate the h5 file for the botanical_garden_osnabrueck map by using:

lvr2_hdf5_mesh_tool -i botanical_garden_osnabrueck_mesh.ply -o botanical_garden_osnabrueck_tool_converted.h5

When I created a launch file following the pluto example using the botanical_garden_osnabrueck_tool_converted.h5 file as input, executing it results in the following error:

terminate called after throwing an instance of 'lvr2::PanicException'
    what():  Program panicked: lookup with an out of bounds handle (4294967295) in StableVector

right after the message:

Start reading the mesh part 'mesh' from the map file '<my package path>/maps/botanical_garden_osnabrueck/botanical_garden_osnabrueck_tool_converted.h5'.


Comparing the original and the lvr2_hdf5_mesh_tool created h5 file, it can be seen that both files have almost the same datasets in the group "mesh/channels", but the dimension sizes of the "faces_indices/_normals" datasets are different (original: 1430188 x 3, tool converted: 1431293 x 3). Also, the original file has two additional datasets, "edge_distances" and "edge_distances_idx".

After having a closer look to the code it seems that the error occurs when reading the map (MeshMap::readMap), more specifically in the getMesh call, that leads to an addFace call. The error occurs here.


Is there another way to create the HDF5 files so that they can be used for the mesh navigation? I have the mesh as an obj or ply file. I also have it as a point cloud (pcd) file, if this would lead to a better solution.

I really hope to get help on this issue as the functionality of the package looks quite interesting.

Thank you!

HirotoUsuba commented 1 year ago

Excuse me. Did you resolve this error?

terminate called after throwing an instance of 'lvr2::PanicException' what(): Program panicked: lookup with an out of bounds handle (4294967295) in StableVector [ERROR] [1682995025.070948328]: Mesh display: no visual available, can't draw mesh! (maybe no data has been received yet?) [ERROR] [1682995025.071107778]: Mesh display: no visual available, can't draw mesh! (maybe no data has been received yet?)

When I also used lvr2_hdf5_mesh_tool to create hdf5 files, I got the same error. If there is another way to avoid the error, please let me know. Thank you!!

HirotoUsuba commented 1 year ago

Hi,

I solved the problem by using the lvr2 tool called lvr2_reconstruct to generate a new ply file from the original ply file!

Thank you!