ai2thor
ai2thor copied to clipboard
The support for multi-agent in ProcTHOR-10k.
Can the scene in procthor-10k support multi-agent setting?
When we load the ai2thor scene, and use agentCount=2 to initize two agents, we can get the following event results of c.last_event.events
:
[<ai2thor.server.Event at 0x7fd536313850
.metadata["lastAction"] = Initialize
.metadata["lastActionSuccess"] = True
.metadata["errorMessage"] = "
.metadata["actionReturn"] = {'cameraNearPlane': 0.009999999776482582, 'cameraFarPlane': 20.0}
>, <ai2thor.server.Event at 0x7fd536313760
.metadata["lastAction"] = Initialize
.metadata["lastActionSuccess"] = True
.metadata["errorMessage"] = "
.metadata["actionReturn"] = {'cameraNearPlane': 0.009999999776482582, 'cameraFarPlane': 20.0}
>]
But when we load the procthor-10k scene, and use agentCount=2 to initize two agents, we can only get the following event results of c.last_event.events
:
[<ai2thor.server.Event at 0x7fd5351e87c0
.metadata["lastAction"] = CreateHouse
.metadata["lastActionSuccess"] = True
.metadata["errorMessage"] = "
.metadata["actionReturn"] = None
>]
We use the controller by
house=dataset["train"][0]
c = Controller(scene=house, agentCount=2)
And when we try to make the agent of agentId=1 to execute the specific action by e2 = c.step("RotateRight", agentId=1)
, it would get this error:
Traceback (most recent call last):
File "../lib/python3.9/site-packages/ai2thor/controller.py", line 979, in step
self.last_event = self.server.receive()
File "../lib/python3.9/site-packages/ai2thor/fifo_server.py", line 229, in receive
metadata, files = self._recv_message(
File "../lib/python3.9/site-packages/ai2thor/fifo_server.py", line 145, in _recv_message
header = self._read_with_timeout(
File "../python3.9/site-packages/ai2thor/fifo_server.py", line 134, in _read_with_timeout
raise TimeoutError(f"Reading from AI2-THOR backend timed out (using {time out}s) timeout.")
TimeoutError: Reading from AI2-THOR backend timed out (using 100.0s) timeout.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "../lib/python3.9/site-packages/ai2thor/controller.py", line 997, in step
raise (TimeoutError if isinstance(e, TimeoutError) else RuntimeError)(
TimeoutError: Error encountered when running action {'action': 'RotateRight', 'agentId': 1, 'sequenceId': 4} in scene Procedural.
So how to use the multi-agent setting in the scene of Procthor-10k?
We don't officially support multi-agent functionality in ProcTHOR scenes. We hope to support this in future version releases.