facebookresearch / habitat-sim

A flexible, high-performance 3D simulator for Embodied AI research.
https://aihabitat.org/
MIT License
2.54k stars 414 forks source link

How to know the min/max value of agent's position #2304

Closed noah822 closed 7 months ago

noah822 commented 7 months ago

Habitat-Sim version

0.3.0

❓ Questions and Help

I want to know what is the range of possible value that can be taken by agent's position array (not consider the fact that some value is un-explorable, I just want to know the range). After reading through the doc, I have not found any explicit api that exposes the min/max value of position array (x, y, z) to the user.

What I have tried

I try to get those value by sim.pathfinder.get_bounds(), where sim is a habitat.Simulator instance. The doc of PathFinder.get_bounds() function is a little bit vague for me. Can I interpret two return value as the range of agent's position?

For example, the following is what I got from get_bounds() for one of scene in MatterPort3D

array([-12.44, -0.23, -9.97], dtype=float32), array([4.12, 7.46, 1.15], dtype=float32)

Is it correct to conclude that the range of possible value of x is [-12.44, 4.12] (same for y and z)?

aclegg3 commented 7 months ago

Hey @noah822 Agreed this query is a bit vague.

Functionally, I'll assume that your agent is constrained to the navmesh and therefore cannot be placed in free space. In that case, the pathfinder bounds do in fact give you the agent's position range.

Concretely, the bounds are the bounding box min and max for all vertices of the navigation mesh.