habitat-sim
habitat-sim copied to clipboard
Problem with calculating large navmeshes
I am trying to run habitat with my own downloaded scenes. However, It seems that if a scene is large (about 200mX200m) it is not possible to calculate a correct navmesh for it and I get this error: RuntimeError: NavMesh has no navigable area, this indicates an issue with the NavMesh Is there a way to fix it? Thank you
Please provide the error that occurs when building that navmesh.
CREATING NAVMESH... I0706 16:48:58.650434 31949 PathFinder.cpp:382] Building navmesh with 4997x4431 cells E0706 16:49:07.447821 31949 PathFinder.cpp:624] Could not build Detour navmesh E0706 16:49:07.481483 31949 Simulator.cpp:786] Failed to build navmesh RuntimeError: NavMesh has no navigable area, this indicates an issue with the NavMesh
Yeah, likely your scene is more complex than Detour can handle. You can try something like mesh decimation to reduce the complexity of the scene, but I'm not sure that'll help. Fixing this would likely require deep changes in Detour.
I agree that mesh decimation may be a good solution here. You can use the decimated mesh to construct an approximate navmesh and save it. Then you can use your original scene for rendering while loading the saved navmesh for navigation.
You may also want to try playing with the navmesh parameters. Hard to say where the complexity bottleneck is, but you may be able to stretch it a bit by changing the cell, mesh, or tiling resolutions.
From the ECCV tutorial, Habitat-sim for Navigation: (note, you may be able to use the tutorial colab to test this out if you can upload your asset)
Detail mesh generation parameters: region_min_size - Minimum number of cells allowed to form isolated island areas. region_merge_size - Any 2-D regions with a smaller span (cell count) will, if possible, be merged with larger regions. [Limit: >=0] edge_max_len - The maximum allowed length for contour edges along the border of the mesh. Extra vertices will be inserted as needed to keep contour edges below this length. A value of zero effectively disables this feature. [Limit: >=0] [ / cell_size] edge_max_error - The maximum distance a simplfied contour's border edges should deviate the original raw contour. [Limit: >=0] verts_per_poly - The maximum number of vertices allowed for polygons generated during the contour to polygon conversion process.[Limit: >= 3] detail_sample_dist - Sets the sampling distance to use when generating the detail mesh. (For height detail only.) [Limits: 0 or >= 0.9] [x cell_size] detail_sample_max_error - The maximum distance the detail mesh surface should deviate from heightfield data. (For height detail only.) [Limit: >=0] [x cell_height]
@yaelbenoren You may also want to try to increase detailSampleMaxError
as that is one of the params of the step that is failing.