habitat.datasets.rearrange.samplers.receptacle.AABBReceptacle class

Defines an AABB Receptacle volume above a surface for sampling object placements within a scene.

Methods

def debug_draw(self, sim: habitat_sim.simulator.Simulator, color: typing.Optional[_magnum.Color4] = None) -> None
Render the AABBReceptacle with DebugLineRender utility at the current frame. Must be called after each frame is rendered, before querying the image data.
def get_global_transform(self, sim: habitat_sim.simulator.Simulator) -> _magnum.Matrix4
Isolates boilerplate necessary to extract receptacle global transform of the Receptacle at the current state. This specialization adds override rotation handling for global bounding box Receptacles.
def sample_uniform_global(self, sim: habitat_sim.simulator.Simulator, sample_region_scale: float) -> _magnum.Vector3
Sample a uniform random point in the local Receptacle volume and then transform it into global space.
def sample_uniform_local(self, sample_region_scale: float = 1.0) -> _magnum.Vector3
Sample a uniform random point in the local AABB.

Special methods

def __init__(self, name: str, bounds: _magnum.Range3D, parent_object_handle: typing.Optional[str] = None, parent_link: typing.Optional[int] = None, up: typing.Optional[_magnum.Vector3] = None, rotation: typing.Optional[_magnum.Quaternion] = None) -> None

Properties

bounds: _magnum.Range3D get
AABB of the Receptacle in local space.
is_parent_object_articulated get
Convenience query for articulated vs. rigid object check.

Method documentation

def habitat.datasets.rearrange.samplers.receptacle.AABBReceptacle.debug_draw(self, sim: habitat_sim.simulator.Simulator, color: typing.Optional[_magnum.Color4] = None) -> None

Render the AABBReceptacle with DebugLineRender utility at the current frame. Must be called after each frame is rendered, before querying the image data.

Parameters
sim Simulator must be provided.
color Optionally provide wireframe color, otherwise magenta.

def habitat.datasets.rearrange.samplers.receptacle.AABBReceptacle.sample_uniform_global(self, sim: habitat_sim.simulator.Simulator, sample_region_scale: float) -> _magnum.Vector3

Sample a uniform random point in the local Receptacle volume and then transform it into global space.

Parameters
sim
sample_region_scale defines a XZ scaling of the sample region around its center.

def habitat.datasets.rearrange.samplers.receptacle.AABBReceptacle.sample_uniform_local(self, sample_region_scale: float = 1.0) -> _magnum.Vector3

Sample a uniform random point in the local AABB.

Parameters
sample_region_scale defines a XZ scaling of the sample region around its center. For example to constrain object spawning toward the center of a receptacle.