Closed pushkalkatara closed 1 year ago
Pushed a fix. Can you try now with: https://github.com/allenai/procthor/commit/4e60f5bb31836ce1c87fef9939fcff7bc23dc3c7 ?
Thanks for pushing the fix. It works now.
Which AI2THOR version / commit should I use with the generated scenes?
I'm currently using the one given in Colab on procthor-10k dataset. I tried running one of these scenes, but Initialization looks pretty weird and the sim is stuck after init.
I think the agent init location is missing in the generated scenes. For procthor-10k dataset it had a specific key Agent
. How do add these to the generated jsons?
There was a script for this, but it might be floating around somewhere. I'd have to check for it.
But, basically, use shapely.geometry
to create a polygon of each of the rooms from the floorPolygons
in the house jsons. Look at using buffer so there is sufficient space between the objects and the position with which the gent would teleport from.
Then, try teleporting the agent to some positions within the polygon, setting y=0.95
for its height. Try this for a bunch of x/z inside of the polygon until any succeeds.
Using the version in the colab is recommended. The agentPoses just aren't specified, so the agent won't be teleported in.
Thanks for the info. If you come across the script, please do drop it in the thread. Meanwhile, I'll implement it through the logic above.
yes, I thought so, probably teleporting the agent within the polygon should make it work. Thanks!
Found the script: link. Dropping here in case it helps.
Scene metadata from procthor-10k:
{'agent': {'horizon': 30, 'position': {'x': 3.5, 'y': 0.95, 'z': 2.0}, 'rotation': {'x': 0, 'y': 90, 'z': 0}, 'standing': True}, 'roomSpecId': 'kitchen', 'schema': '0.0.1', 'warnings': {}, 'agentPoses': {'arm': {'horizon': 30, 'position': {'x': 3.5, 'y': 0.95, 'z': 2.0}, 'rotation': {'x': 0, 'y': 90, 'z': 0}, 'standing': True}, 'default': {'horizon': 30, 'position': {'x': 3.5, 'y': 0.95, 'z': 2.0}, 'rotation': {'x': 0, 'y': 90, 'z': 0}, 'standing': True}, 'locobot': {'horizon': 30, 'position': {'x': 3.5, 'y': 0.95, 'z': 2.0}, 'rotation': {'x': 0, 'y': 90, 'z': 0}}, 'stretch': {'horizon': 30, 'position': {'x': 3.5, 'y': 0.95, 'z': 2.0}, 'rotation': {'x': 0, 'y': 90, 'z': 0}, 'standing': True}}}
Scene metadata from procthor:
{'agent': {'position': {'x': 4.0, 'y': 0.95, 'z': 3.5}, 'rotation': {'x': 0, 'y': 0, 'z': 0}, 'standing': True, 'horizon': 30}, 'roomSpecId': 'bedroom', 'schema': '0.0.1'}
agentPoses was missing from the JSoN which was causing the issue.
Adding this in house.py resolved the issue:
def _add_metadata(self) -> None:
start_pose = self.choose_agent_pose()
self.data["metadata"] = {
"agent": start_pose,
"roomSpecId": self.room_spec.room_spec_id,
"schema": SCHEMA,
"agentPoses": {'default' : start_pose}
}
Closing the issue. Thanks, @mattdeitke for helping out.
Hi,
Running the example script gives the following error:
The event error message gives:
how do i fix this issue?