Skip to content

Find which region the agent is in #714

@zhangfuyang

Description

@zhangfuyang

Hi,
I have a question about how to get the current room label that the agent is in. I am working on the mp3d datatset. I noticed these two previous issues: #331 and issue in habitat-sim addressing this problem. But I still couldn't make it work.

I wonder if I am doing the right thing.

regions = sim.semantic_annotations().regions
agent_loc = sim.get_agent_state(0).position

''' Check if agent is in region 0 '''
center = region[0].aabb.center
sizes = region[0].aabb.sizes
if center - 1/2 sizes < agent_loc < center + 1/2 sizes, then True

Also, I find the z-axis of regions sizes are all negative in the scene "EU6Fwq7SyZv". This doesn't make sense to me.

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