class
ObjectStateSpecAbstract base class for object states specifications. Defines the API for inherited and extended states.
An ObjectStateSpec is a singleton instance defining the interface and dynamics of a particular metadata state.
Many ManagedObject instances can share an ObjectStateSpec, but there should be only one for each active Simulator since the state may compute and pivot on global internal caches and variables.
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.
- 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 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. ObjectStateSpec. 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. ObjectStateSpec. 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.
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. ObjectStateSpec. 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. ObjectStateSpec. 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. ObjectStateSpec. update_state_context(self,
sim: habitat_sim.simulator.Simulator) -> None
Update internal state context independent of individual objects’ states.
Parameters | |
---|---|
sim | The Simulator instance. |