Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

object visible in the metadata can not seen in the observation image #1199

Open
WangJuan6 opened this issue Mar 21, 2024 · 0 comments
Open

Comments

@WangJuan6
Copy link

Dear author,

I want to use the GetInteractablePoses action to acquire the image that the target object is visible, but I find some positions can not see the target object. Then, I teleport to these positions and rotations, the target object still can not seen in the observation image, but the result of the target object being visible is True.

This is my teleport code:

import prior
from ai2thor.controller import Controller
import cv2
import prior

dataset = prior.load_dataset("procthor-10k")
scene_num = 93
scene_name = dataset["train"][scene_num]

controller = Controller(scene=scene_name,
                            gridSize=0.25,
                            renderImage=True,
                            renderDepthImage=True,
                            renderClassImage=True,
                            renderObjectImage=True,
                            visibility_distance=True,
                            width=640,
                            height=480,
                            )
event = controller.step(dict(
            action='Initialize',
            gridSize=0.25,
            renderImage=True,
            renderDepthImage=True,
            renderClassImage=True,
            renderObjectImage=True,
            visibility_distance=True,
            makeAgentsVisible=False,
            horizon=0,
        ))
position = {'x': 8.0, 'y': 0.9009993672370911, 'z': 4.0}
rotation = {'x': -0.0, 'y': 0.0, 'z': 0.0}
event=controller.step(action="Teleport", rotation=dict(x=0,y=0,z=0), position=position)
rgb = event.frame.copy()
rgb_frame = cv2.cvtColor(rgb, cv2.COLOR_BGR2RGB)
cv2.imwrite("img.png",rgb_frame)

this image shows the observation image:
img

these images show some results of the event.metadata:
vis_img
agent_pose
action_success

I can not see the armchair in the observation image, but the result of the armchair being visible is True.
Can you help me to solve this problem?
Thanks
Juan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant