🏠 Scene
Description
In OmniGibson
, Scene
s represent a collection of Object
s and global System
s, potentially defined with a pre-configured state. A scene can be constructed iteratively and interactively, or generated from a pre-cached file.
Usage
Importing
Every Environment
instance includes a scene, defined by its config that is passed to the environment constructor via the scene
key. This is expected to be a dictionary of relevant keyword arguments, specifying the desired scene configuration to be created. The type
key is required and specifies the desired scene class. Additional keys can be specified and will be passed directly to the specific scene class constructor. An example of a scene configuration is shown below in .yaml
form:
rs_int_example.yaml
Alternatively, a scene can be directly imported at runtime by first creating the scene class instance (e.g.: scene = InteractiveTraversableScene(...)
) and then importing it via og.sim.import_scene(obj)
. This can be useful for iteratively prototyping a desired scene configuration. Note that a scene must be imported before any additional objects are imported!
Runtime
To import an object into a scene, call scene.add_object(obj)
.
The scene keeps track of and organizes all imported objects via its owned scene.object_registry
. Objects can quickly be queried by relevant property keys, such as name
, prim_path
, and category
, from env.scene.object_registry
as follows:
scene.object_registry_unique_keys
and scene.object_registry_group_keys
define the valid possible key queries
-
env.scene.object_registry("name", OBJECT_NAME)
: get the object by its name -
env.scene.object_registry("prim_path", PRIM_PATH)
: get the object by its prim path -
env.scene.object_registry("category", CATEGORY)
: get all objects with categoryCATEGORY
Similarly, systems can be queried via scene.system_registry
.
In addition, a scene can always be reset by calling reset()
. The scene's initial state is cached when the scene is first imported, but can manually be updated by calling scene.update_initial_state(state)
, where state
can either be a desired state (output of og.sim.dump_state()
) or None
, corresponding to the current sim state.
Types
OmniGibson
currently supports two types of scenes. The basic scene class Scene
implements a minimal scene setup, which can optionally include a skybox and / or ground plane. The second scene class InteractiveTraversableScene
represents a pre-cached, curated scene exclusively populated with fully-interactive objects from the BEHAVIOR-1K dataset. This scene type additionally includes traversability and semantic maps of the scene floorplan. For a breakdown of all the available scenes and the corresponding objects included in each scene, please refer our Knowledgebase Dashboard. Below, we provide brief snapshots of each of our 50 BEHAVIOR-1K scenes:
Beechwood_0_garden |
||
Beechwood_0_int |
||
Beechwood_1_int |
||
Benevolence_0_int |
||
Benevolence_1_int |
||
Benevolence_2_int
|
||
Ihlen_0_int |
||
Ihlen_1_int |
||
Merom_0_garden |
||
Merom_0_int |
||
Merom_1_int |
||
Pomaria_0_garden |
||
Pomaria_0_int |
||
Pomaria_1_int |
||
Pomaria_2_int |
||
Rs_garden |
||
Rs_int |
||
Wainscott_0_garden |
||
Wainscott_0_int |
||
Wainscott_1_int |
||
grocery_store_asian |
||
grocery_store_cafe |
||
grocery_store_convenience |
||
grocery_store_half_stocked |
||
hall_arch_wood |
||
hall_conference_large |
||
hall_glass_ceiling |
||
hall_train_station |
||
hotel_gym_spa |
||
hotel_suite_large |
||
hotel_suite_small |
||
house_double_floor_lower |
||
house_double_floor_upper |
||
house_single_floor |
||
office_bike |
||
office_cubicles_left |
||
office_cubicles_right |
||
office_large |
||
office_vendor_machine |
||
restaurant_asian |
||
restaurant_brunch |
||
restaurant_cafeteria |
||
restaurant_diner |
||
restaurant_hotel |
||
restaurant_urban |
||
school_biology |
||
school_chemistry |
||
school_computer_lab_and_infirmary |
||
school_geography |
||
school_gym |