Exception: Unity process has exited - check ~/.config/unity3d/Allen\ Institute\ for\ Artificial\ Intelligence/AI2-THOR/Player.log for errors. Confirm that Vulkan is properly configured on this system using vulkaninfo from the vulkan-utils package. returncode=-11
Bailey-24 opened this issue · 2 comments
Bailey-24 commented
I run the code in demo.ipynb
# the data will be saved under {data_path}/thor_tasks/makeCoffee/makeCoffee-1.
run_data_gen(data_path=os.getcwd(), task=task_info)
but there is error
Exception Traceback (most recent call last)
Cell In[4], line 2
1 # the data will be saved under {data_path}/thor_tasks/makeCoffee/makeCoffee-1.
----> 2 run_data_gen(data_path=os.getcwd(), task=task_info)
File ~/Desktop/robotLearning/reflect/main/gen_data.py:75, in run_data_gen(data_path, task)
72 pickle.dump([], handle, protocol=pickle.HIGHEST_PROTOCOL)
74 for i in range(int(task['num_samples'])):
---> 75 controller = Controller(
76 agentMode="default",
77 massThreshold=None,
78 scene=task['scene'],
79 visibilityDistance=1.5,
80 gridSize=0.25,
81 renderDepthImage=True,
82 renderInstanceSegmentation=True,
83 width=960,
84 height=960,
85 fieldOfView=60,
86 platform=CloudRendering
87 )
88 # print("controller.last_event.metadata: ", controller.last_event.metadata['agent'])
89 reachable_positions = controller.step(action="GetReachablePositions").metadata["actionReturn"]
File ~/anaconda3/envs/reflect_env/lib/python3.9/site-packages/ai2thor/controller.py:518, in Controller.__init__(self, quality, fullscreen, headless, port, start_unity, local_executable_path, local_build, commit_id, branch, width, height, x_display, host, scene, image_dir, save_image_per_frame, depth_format, add_depth_noise, download_only, include_private_scenes, server_class, gpu_device, platform, server_timeout, server_start_timeout, **unity_initialization_parameters)
515 self._build.download()
517 if not download_only:
--> 518 self.start(
519 port=port,
520 start_unity=start_unity,
521 width=width,
522 height=height,
523 x_display=x_display,
524 host=host,
525 )
527 self.initialization_parameters = unity_initialization_parameters
529 if "continuous" in self.initialization_parameters:
File ~/anaconda3/envs/reflect_env/lib/python3.9/site-packages/ai2thor/controller.py:1436, in Controller.start(self, port, start_unity, width, height, x_display, host, player_screen_width, player_screen_height)
1433 self.prune_releases()
1435 unity_params = self.server.unity_params()
-> 1436 self._start_unity_thread(env, width, height, unity_params, image_name)
1438 # receive the first request
1439 self.last_event = self.server.receive(timeout=self.server_start_timeout)
File ~/anaconda3/envs/reflect_env/lib/python3.9/site-packages/ai2thor/controller.py:1153, in Controller._start_unity_thread(self, env, width, height, server_params, image_name)
1144 if self.server.unity_proc.returncode is not None:
1145 message = (
1146 "Unity process has exited - check "
1147 "~/.config/unity3d/Allen\ Institute\ for\ "
(...)
1151 % (self.server.unity_proc.returncode,)
1152 )
-> 1153 raise Exception(message)
1155 except subprocess.TimeoutExpired:
1156 pass
Exception: Unity process has exited - check ~/.config/unity3d/Allen\ Institute\ for\ Artificial\ Intelligence/AI2-THOR/Player.log for errors. Confirm that Vulkan is properly configured on this system using vulkaninfo from the vulkan-utils package. returncode=-11
My test and debug:
I have install unity, nvidia drive and CUDA in ubuntu20.04
I also run the minimal example in ai2thor
the result look good.
But I have the same error show above. please tell me how to solve.
lzylucy commented
Thanks for your interest in the project! Looks like the error is specific to the CloudRendering option in order to run unity headless.
https://github.com/allenai/ai2thor/blob/8ae7f49d1524c0854e6555dfb58711221f0c3402/ai2thor/controller.py#L1162
- A quick fix would be to remove
platform=CloudRendering
since you seem to be running it on a desktop. - If you do want to run it headless, you can look into
Player.log
and post the error message in this thread. I can help check! I also do not have unity installed on my system, I believe when you call controller, ai2thor will download the unity package and store it under~/.ai2thor
. Not sure there's any incompatibility between the two and cause the crash.
Yunduoii commented
请问如何解决的