Is there a way to get the location of a specific type of object in all scenes? #676
-
Hey, this could be a stupid question. I want to train a navigation agent using ai2thor environment for the first time. Before training I have to know where the targets are. For example, I must get the global locations of APPLES as targets in all the KITCHEN scenes before training. I've used "controller.last_event.metadata['objects']" api. But sometimes the agent is spawn facing a WALL without seeing anything including the target I want. It's quite annoying to handcraft the camera direction of the agent to get the target in the camera view scene by scene. Please help, is there a way to get the location of a specific type of object in all scenes? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey @NYGKNYGK, One important point to clarify is that scenes may have more than one object of the same type. For instance, there may be several books or there may be several chairs that exist within a single scene. Thus, objects are differentiated by instance/id, and not by type. But, each object has an object type tag.
I have added an example of getting the position of each Apple within each kitchen scene: Let me know if you have any questions! Also related, you may find #416 (comment) useful. |
Beta Was this translation helpful? Give feedback.
Hey @NYGKNYGK,
One important point to clarify is that scenes may have more than one object of the same type. For instance, there may be several books or there may be several chairs that exist within a single scene. Thus, objects are differentiated by instance/id, and not by type. But, each object has an object type tag.
controller.last_event.metadata["objects"]
returns the metadata for all the objects in the scene, not just the ones the agent is looking at.