factory
get_object_state_instance(state_class, obj, params=None)
Create an BaseObjectState child class instance for a given object & state.
The parameters passed in as a dictionary through params are passed as kwargs to the object state class constructor.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
state_class |
BaseObjectState
|
The state name from the state name dictionary. |
required |
obj |
StatefulObject
|
The object for which the state is being constructed. |
required |
params |
dict
|
Dictionary of {param: value} corresponding to the state's params. |
None
|
Returns:
Name | Type | Description |
---|---|---|
BaseObjectState | The constructed state object |
Source code in omnigibson/object_states/factory.py
get_state_dependency_graph()
Returns:
Type | Description |
---|---|
nx.DiGraph: State dependency graph of supported object states |
Source code in omnigibson/object_states/factory.py
get_states_by_dependency_order()
Returns:
Name | Type | Description |
---|---|---|
list | all states in topological order of dependency |