Skip to content

GetInteractablePoses does not update based on held object #1302

@philipwzf

Description

@philipwzf

Based on the documentation, GetInteractablePoses should return poses of which the target object is visible. However, when I tested the function with different handheld objects, the function does not seem to work as expected.
Repro (AI2-THOR 5.0.0, Python 3.10):

from ai2thor.controller import Controller
env = Controller()
env.reset(f"FloorPlan201")
reachable = env.step(action="GetReachablePositions").metadata["actionReturn"]
target_id = "Drawer|-00.31|+00.63|+03.37"

poses = env.step(
    action="GetInteractablePoses",
    objectId=target_id,
    positions=reachable,
    standings=[True],
).metadata["actionReturn"]

env.step(action="PickupObject", objectId="Pillow|-03.15|+00.68|+03.42", forceAction=True)

poses_holding = env.step(
    action="GetInteractablePoses",
    objectId=target_id,
    positions=reachable,
    standings=[True],
).metadata["actionReturn"]

print(len(poses) == len(poses_holding))  # Prints True

"""
Should be False as there are poses where pillow will block the view
A couple poses that makes drawer not visible while try to open
{'x': -2.0, 'y': 0.9026566743850708, 'z': 0.5, 'rotation': 90.0, 'standing': True, 'horizon': 30.0}
{'x': -0.75, 'y': 0.9026566743850708, 'z': 3.75, 'rotation': 90.0, 'standing': True, 'horizon': 60.0}
{'x': -0.75, 'y': 0.9026566743850708, 'z': 3.5, 'rotation': 180.0, 'standing': True, 'horizon': 30.0}
"""

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions