ai2thor icon indicating copy to clipboard operation
ai2thor copied to clipboard

Is there a way to know if "PutObject" will work before trying the action?

Open soyeonm opened this issue 4 years ago • 2 comments

Hello,

Thank you all the time for your kind responses. For other interactions (e.g. "PickupObject", "ToggleOn"), the objects that are 'visible' inside last_event.metadata["objects"] indicate whether it is interactable (e.g. Pickupable). In other words, when the agent tries to pick up an object that is visible, it does not fail.

However, for "PutObject" actions, even if the receptacle (e.g. "Table") is visible, the actions fails frequently. I realized that at most times, the agent is required to move closer to the receptacle beyond jus the 'visible' range.

Is there a way to know in advance whether the receptacle is within the interactable range of "PutObject" before actually trying "PutObject"?

I am using AI2THOR 2.1.0 (I can't use newer versions, sorry).

Thanks.

soyeonm avatar Apr 23 '21 13:04 soyeonm

So I am asking whether there is something that corresponds to "VisibilityDistance" for "PutObject" actions. (Since "PutObject" does not always seem to work even when the receptacle is visible.)

soyeonm avatar Apr 23 '21 13:04 soyeonm

There is not a way to preemptively check if a PutObject action will work without trying the action itself given the version you are using.

This action checks both of the target receptacle is within visibility distance as well as if the object the agent is holding can fit into that receptacle. I believe the behavior you are seeing where moving closer to the receptacle can have more success placing objects is due to the potential points where a held object can be placed expanding as more area of the receptacle enters the visibility range.

There was another issue (#525) that might be useful to you as it was a similar problem and explains more about how visibility and receptacles work in regards to how valid points to place an object are chosen.

winthos avatar Apr 23 '21 17:04 winthos