allenai / ai2thor

An open-source platform for Visual AI.
http://ai2thor.allenai.org
Apache License 2.0
1.2k stars 217 forks source link

The action 'ToggleMapView' #599

Open liuxz-cs opened 3 years ago

liuxz-cs commented 3 years ago

I want to see some information and parameter about the action 'ToggleMapView'. And I want to know about the information of the metadata cameraPosition and cameraOrthSize. I cannot find relevant materials in documentation about those.

I think the documentation online https://ai2thor.allenai.org/ithor/documentation/ do not include all the actions and attributes. Will you update the documentation for all actions and metadata, I sometimes cannot find what I want to do in the documentation.

mattdeitke commented 3 years ago

I have plans soon to update the documentation dynamically from inside the code, so soon the API documentation will always match what is available and one to go back to older versions of the documentation more easily.

We've intentionally left ToggleMapView because it has a few flaws (see #445 and #597). Moreover, it counterintuitively reuses the same camera that the agent uses (which breaks many object interaction actions since the camera's position has moved, and the camera's position is used to check if the distance to an object is close enough for interaction). Thus, it is often only used for debugging.

However, the one nice thing about the action is that it toggles the ceiling off. By default, if you place a ThirdPartyCamera outside of an iTHOR scene, the ceiling will show on the images. So, one often needs to call:

from ai2thor.controller import Controller
controller = Controller(scene='FloorPlan28')
controller.step('ToggleMapView')
controller.step(
    'AddThirdPartyCamera'
    # POSITION AND ROTATION as a birds eye view
)

Just to get ThirdPartyCameras working correctly from a top-down view.

AnukritiSinghh commented 1 year ago

@mattdeitke can I get the depth map of the top view image? I wanted to ask if its possible Thanks!