habitat.sims.habitat_simulator.object_state_machine.ObjectIsClean class

ObjectIsClean state specifies whether an object is clean or dirty.

Methods

def default_value(self) -> typing.Any
If an object does not have a value for this state defined, return a default value.
def draw_context(self, debug_line_render: habitat_sim._ext.habitat_sim_bindings.DebugLineRender, camera_transform: _magnum.Matrix4) -> None
Draw any context cues which are independent of individual objects’ state. Meant to be called once per draw per ObjectStateSpec singleton.
def draw_state(self, obj: typing.Union[habitat_sim._ext.habitat_sim_bindings.ManagedArticulatedObject, habitat_sim._ext.habitat_sim_bindings.ManagedRigidObject], debug_line_render: habitat_sim._ext.habitat_sim_bindings.DebugLineRender, camera_transform: _magnum.Matrix4) -> None
Logic to draw debug lines visualizing this state for the object. Draws a circle highlight around the object color by state value: green if True, red if False.
def is_affordance_of_obj(self, obj: typing.Union[habitat_sim._ext.habitat_sim_bindings.ManagedArticulatedObject, habitat_sim._ext.habitat_sim_bindings.ManagedRigidObject]) -> bool
Determine whether or not an object instance can have this ObjectStateSpec by checking semantic class against the configured set.
def toggle(self, obj: typing.Union[habitat_sim._ext.habitat_sim_bindings.ManagedArticulatedObject, habitat_sim._ext.habitat_sim_bindings.ManagedRigidObject]) -> bool
Toggles a boolean state, returning the newly set value.
def update_state(self, sim: habitat_sim.simulator.Simulator, obj: typing.Union[habitat_sim._ext.habitat_sim_bindings.ManagedArticulatedObject, habitat_sim._ext.habitat_sim_bindings.ManagedRigidObject], dt: float) -> None
Add state machine logic to modify the state of an object given access to the Simulator and timestep. Meant to be called from within the simulation or step loop to continuously update the state.
def update_state_context(self, sim: habitat_sim.simulator.Simulator) -> None
Update internal state context independent of individual objects’ states.

Special methods

def __init__(self)

Method documentation

def habitat.sims.habitat_simulator.object_state_machine.ObjectIsClean.draw_context(self, debug_line_render: habitat_sim._ext.habitat_sim_bindings.DebugLineRender, camera_transform: _magnum.Matrix4) -> None

Draw any context cues which are independent of individual objects’ state. Meant to be called once per draw per ObjectStateSpec singleton.

Parameters
debug_line_render The DebugLineRender instance for the Simulator.
camera_transform The Matrix4 camera transform.

def habitat.sims.habitat_simulator.object_state_machine.ObjectIsClean.draw_state(self, obj: typing.Union[habitat_sim._ext.habitat_sim_bindings.ManagedArticulatedObject, habitat_sim._ext.habitat_sim_bindings.ManagedRigidObject], debug_line_render: habitat_sim._ext.habitat_sim_bindings.DebugLineRender, camera_transform: _magnum.Matrix4) -> None

Logic to draw debug lines visualizing this state for the object. Draws a circle highlight around the object color by state value: green if True, red if False.

Parameters
obj The ManagedObject instance.
debug_line_render The DebugLineRender instance for the Simulator.
camera_transform The Matrix4 camera transform.

def habitat.sims.habitat_simulator.object_state_machine.ObjectIsClean.is_affordance_of_obj(self, obj: typing.Union[habitat_sim._ext.habitat_sim_bindings.ManagedArticulatedObject, habitat_sim._ext.habitat_sim_bindings.ManagedRigidObject]) -> bool

Determine whether or not an object instance can have this ObjectStateSpec by checking semantic class against the configured set.

Parameters
obj The ManagedObject instance.
Returns Whether or not the object has this state affordance.

def habitat.sims.habitat_simulator.object_state_machine.ObjectIsClean.toggle(self, obj: typing.Union[habitat_sim._ext.habitat_sim_bindings.ManagedArticulatedObject, habitat_sim._ext.habitat_sim_bindings.ManagedRigidObject]) -> bool

Toggles a boolean state, returning the newly set value.

Parameters
obj The ManagedObject instance.
Returns The new value of the state.

def habitat.sims.habitat_simulator.object_state_machine.ObjectIsClean.update_state(self, sim: habitat_sim.simulator.Simulator, obj: typing.Union[habitat_sim._ext.habitat_sim_bindings.ManagedArticulatedObject, habitat_sim._ext.habitat_sim_bindings.ManagedRigidObject], dt: float) -> None

Add state machine logic to modify the state of an object given access to the Simulator and timestep. Meant to be called from within the simulation or step loop to continuously update the state.

Parameters
sim The Simulator instance.
obj The ManagedObject instance.
dt The timestep over which to update.

def habitat.sims.habitat_simulator.object_state_machine.ObjectIsClean.update_state_context(self, sim: habitat_sim.simulator.Simulator) -> None

Update internal state context independent of individual objects’ states.

Parameters
sim The Simulator instance.