env_wrapper
EnvironmentWrapper
Bases: Wrapper, Registerable
Base class for all environment wrappers in OmniGibson. In general, reset(), step(), and observation_spec() should be overwritten
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
env
|
OmniGibsonEnv
|
The environment to wrap. |
required |
Source code in OmniGibson/omnigibson/envs/env_wrapper.py
observation_spec()
By default, grabs the normal environment observation_spec
Returns:
| Type | Description |
|---|---|
dict
|
Observations from the environment |
reset()
By default, run the normal environment reset() function
Returns:
| Type | Description |
|---|---|
dict
|
Environment observation space after reset occurs |
step(action, n_render_iterations=1)
By default, run the normal environment step() function
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
action
|
tensor
|
action to take in environment |
required |
n_render_iterations
|
int
|
Number of rendering iterations to use before returning observations |
1
|
Returns:
| Type | Description |
|---|---|
4 - tuple
|
|
Source code in OmniGibson/omnigibson/envs/env_wrapper.py
create_wrapper(env, wrapper_cfg=None)
Wraps environment @env with wrapper defined @wrapper_cfg
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
env
|
Environment
|
environment to wrap |
required |
wrapper_cfg
|
None or dict
|
Specified, configuration to wrap environment with If not specified, will default to env.wrapper_config |
None
|