Open soumith opened 4 years ago
We likely need to decimate replica meshes for them to work with physics. We should (if possible) fix whatever bug is causing this but I would be surprised if Bullet was useable with replica meshes in their current form (I think the one you are loading has ~14 million vertices). We had started working on adding a mesh decimation tool here: https://github.com/facebookresearch/habitat-sim/pull/468
We likely need to decimate replica meshes for them to work with physics. We should (if possible) fix whatever bug is causing this but I would be surprised if Bullet was useable with replica meshes in their current form (I think the one you are loading has ~14 million vertices). We had started working on adding a mesh decimation tool here: #468
@erikwijmans I tried to decimate the room_2 semantic mesh to <500000 vertices but it still doesn't work (roughly same error as OP):
I0523 17:02:43.036067 734671 Simulator.cpp:206] ::setSceneInstanceAttributes : Navmesh file location in scene instance : /media/giuliano/wd_ssd/datasets/replica/room_2/habitat/mesh_semantic.navmesh
I0523 17:02:43.036077 734671 Simulator.cpp:213] ::setSceneInstanceAttributes : Loading navmesh from /media/giuliano/wd_ssd/datasets/replica/room_2/habitat/mesh_semantic.navmesh
I0523 17:02:43.036129 734671 Simulator.cpp:216] ::setSceneInstanceAttributes : Navmesh Loaded.
I0523 17:02:43.036149 734671 SceneGraph.h:85] Created DrawableGroup:
I0523 17:02:43.036154 734671 Simulator.cpp:251] ::setSceneInstanceAttributes : SceneInstance : /media/giuliano/wd_ssd/datasets/replica/room_2/habitat/mesh_semantic.ply proposed Semantic Scene Descriptor filename : /media/giuliano/wd_ssd/datasets/replica/room_2/habitat/mesh_semantic.scn
E0523 17:02:43.036163 734671 SemanticScene.h:155] ::loadSemanticSceneDescriptor : File /media/giuliano/wd_ssd/datasets/replica/room_2/habitat/mesh_semantic.scn does not exist. Aborting load.
W0523 17:02:43.036460 734671 Simulator.cpp:275] ::setSceneInstanceAttributes : All attempts to load SSD with SceneAttributes-provided name /media/giuliano/wd_ssd/datasets/replica/room_2/habitat/mesh_semantic.scn : exist : 0 : loaded as expected type : 1
I0523 17:02:43.109735 734671 Simulator.cpp:324] ::createSceneInstance : Using scene instance-specified Light key : -no_lights-
I0523 17:02:43.109759 734671 MetadataMediator.cpp:68] ::setSimulatorConfiguration : Set new simulator config for scene/stage : /media/giuliano/wd_ssd/datasets/replica/room_2/habitat/mesh_semantic.ply and dataset : default which is currently active dataset.
I0523 17:02:43.109795 734671 Simulator.cpp:382] ::createSceneInstance : Start to load stage named : /media/giuliano/wd_ssd/datasets/replica/room_2/habitat/mesh_semantic.ply with render asset : /media/giuliano/wd_ssd/datasets/replica/room_2/habitat/mesh_semantic.ply and collision asset : /media/giuliano/wd_ssd/datasets/replica/room_2/habitat/mesh_semantic.ply
W0523 17:02:43.109840 734671 ResourceManager.cpp:252] ::loadStage : Not loading semantic mesh - File Name : /media/giuliano/wd_ssd/datasets/replica/room_2/habitat/mesh_semantic_semantic.ply does not exist.
I0523 17:02:43.109850 734671 ResourceManager.cpp:285] ::loadStage : start load render asset /media/giuliano/wd_ssd/datasets/replica/room_2/habitat/mesh_semantic.ply.
I0523 17:02:43.109856 734671 ResourceManager.cpp:699] ::loadStageInternal : Attempting to load stage /media/giuliano/wd_ssd/datasets/replica/room_2/habitat/mesh_semantic.ply
E0523 17:02:43.909266 734671 BulletPhysicsManager.cpp:265] Invalid primitive 0
E0523 17:02:43.909301 734671 BulletPhysicsManager.cpp:267] Cannot load collision mesh, skipping
E0523 17:02:43.909307 734671 ResourceManager.cpp:339] ::loadStage : Adding Stage /media/giuliano/wd_ssd/datasets/replica/room_2/habitat/mesh_semantic.ply to PhysicsManager failed. Aborting scene initialization.
E0523 17:02:43.909317 734671 Simulator.cpp:394] ::createSceneInstance : Cannot load stage : /media/giuliano/wd_ssd/datasets/replica/room_2/habitat/mesh_semantic.ply
I0523 17:02:43.911481 734671 BulletPhysicsManager.cpp:35] Deconstructing BulletPhysicsManager
I0523 17:02:43.911545 734671 PhysicsManager.cpp:50] Deconstructing PhysicsManager
I0523 17:02:43.911561 734671 SemanticScene.h:43] Deconstructing SemanticScene
I0523 17:02:43.911584 734671 SceneManager.h:25] Deconstructing SceneManager
I0523 17:02:43.911589 734671 SceneGraph.h:25] Deconstructing SceneGraph
I0523 17:02:43.912503 734671 Renderer.cpp:71] Deconstructing Renderer
I0523 17:02:43.912528 734671 WindowlessContext.h:17] Deconstructing WindowlessContext
...
self.sim = habitat_sim.Simulator(self.cfg)
File "<attrs generated init habitat_sim.simulator.Simulator>", line 11, in __init__
File "/home/giuliano/miniconda3/envs/robostackenv/lib/python3.8/site-packages/habitat_sim/simulator.py", line 121, in __attrs_post_init__
self.__set_from_config(self.config)
File "/home/giuliano/miniconda3/envs/robostackenv/lib/python3.8/site-packages/habitat_sim/simulator.py", line 252, in __set_from_config
self._config_backend(config)
File "/home/giuliano/miniconda3/envs/robostackenv/lib/python3.8/site-packages/habitat_sim/simulator.py", line 196, in _config_backend
super().__init__(config.sim_cfg, config.metadata_mediator)
ValueError: ::createSceneInstance : Cannot load: /media/giuliano/wd_ssd/datasets/replica/room_2/habitat/mesh_semantic.ply
were you able to figure out what is causing this?
🐛 Bug
Any environment from https://github.com/facebookresearch/Replica-Dataset fails to work when enabling Bullet physics.
It works with:
The exact spot in the logs that fails is:
Sometimes it's
Invalid primitive: Points
, sometimesBulletPhysicsManager.cpp:99] Invalid primitive -2101531424
, etc. It looks like some kind of overflow or stack corruption from a quick glance.Command
The paths I use:
Logs
Expected behavior
The scene loads without crash