object visible in the metadata can not seen in the observation image
WangJuan6 opened this issue · 0 comments
WangJuan6 commented
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:
these images show some results of the event.metadata:
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