examples: interactive_play.py - segmentation fault
See original GitHub issueHabitat-Lab and Habitat-Sim versions
Habitat-Lab: master Habitat-Sim: stable (installed via conda)
❓ Questions and Help
I am trying to get the example code to run
if I run python examples/interactive_play.py
I am getting a Segmentation fault error.
Fatal Python error: (pygame parachute) Segmentation Fault
Current thread 0x00007f8cffe50340 (most recent call first):
File "/home/Pia/anaconda3/envs/habitat-36/lib/python3.6/site-packages/habitat_sim/simulator.py", line 615 in draw_observation
File "/home/Pia/anaconda3/envs/habitat-36/lib/python3.6/site-packages/habitat_sim/simulator.py", line 400 in get_sensor_observations
File "/home/Pia/Development/manipulation/habitat-lab/habitat/tasks/rearrange/rearrange_sim.py", line 368 in step
File "/home/Pia/Development/manipulation/habitat-lab/habitat/tasks/rearrange/actions.py", line 68 in step
File "/home/Pia/Development/manipulation/habitat-lab/habitat/core/embodied_task.py", line 303 in step
File "/home/Pia/Development/manipulation/habitat-lab/habitat/tasks/rearrange/rearrange_task.py", line 48 in step
File "/home/Pia/Development/manipulation/habitat-lab/habitat/tasks/rearrange/rearrange_pick_task.py", line 144 in step
File "/home/Pia/Development/manipulation/habitat-lab/habitat/core/env.py", line 267 in step
File "examples/interactive_play.py", line 127 in step_env
File "examples/interactive_play.py", line 248 in get_input_vel_ctlr
File "examples/interactive_play.py", line 297 in play_env
File "examples/interactive_play.py", line 376 in <module>
Aborted (core dumped)
The error arises in line 292 of interactive_play.py, when the variable step_results is set. The error seems to be related to the renderer. The segmentation fault finally happens in line 615 of habitat-sim/simulator.py (last stable version) self._sim.renderer.draw(self._sensor_object, self._sim)
.
Any idea how to fix this, or whether I am something is missing? Thank you very much!
A little side information: If I comment the following lines in interactive_play.py
screen = pygame.display.set_mode(
[draw_obs.shape[1], draw_obs.shape[0]]
)
and create the scene within the while loop (just for debugging here)
screen = pygame.display.set_mode([640, 512]) # new line added
screen.blit(draw_obuse_ob, (0, 0))
I can see the rendered output in the first iteration of the while loop, but the segmentation fault error appears again in the second iteration of the while loop, when step_result is computed.
If I use the last stable version of habitat-lab, the interactive_play.py script runs, however the shown output is black and the terminal outputs repetitively the following two lines:
W0721 20:14:02.845535 15000 PhysicsManager.cpp:248] ::addObject : simpleObjectHandle : new_obj_viz
W0721 20:14:02.845551 15000 PhysicsManager.cpp:251] ::addObject : newObjectHandle : new_obj_viz_:0000
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:5
Top GitHub Comments
Hi, we are using this repo for a project at university and one of my project partners found, that you can start the example by installing an earlier pygame version.
pip install pygame==1.9.6
I am not sure, if this could be a final solution for this issue, because I am not sure of the implications of using this earlier version but it can at least be a workaround for you.
@Stefuniverse’s solution is working for me! Thanks