macros
Set of macros to use globally for OmniGibson. These are generally magic numbers that were tuned heuristically.
NOTE: This is generally decentralized -- the monolithic @settings variable is created here with some global values, but submodules within OmniGibson may import this dictionary and add to it dynamically
MacroDict
Bases: Dict
Source code in OmniGibson/omnigibson/macros.py
is_locked
property
Returns True if the config is locked (no value updates allowed after initial read).
lock()
Lock the config. Afterward, key values cannot be updated after initial read
unlock()
Unlock the config. Afterward, key values can be updated even after initial read
unlocked()
A context scope for modifying a Config object. Within the scope, values can be updated, even after an initial read. Upon leaving the scope, the initial level of locking is restored.
Source code in OmniGibson/omnigibson/macros.py
create_module_macros(module_path)
Creates a dictionary that can be populated with module macros based on the module's @module_path
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
module_path
|
str
|
Relative path from the package root directory pointing to the module. This will be parsed to generate the appropriate sub-macros dictionary, e.g., for module "dirty" in omnigibson/object_states_dirty.py, this would generate a dictionary existing at macros.object_states.dirty |
required |
Returns:
| Type | Description |
|---|---|
MacroDict
|
addict/macro dictionary which can be populated with values |