Unverified Commit 96737252 authored by Mayank Mittal's avatar Mayank Mittal Committed by GitHub

Adds observation and action spaces to the `RLEnv` class (#206)

# Description

Adds missing observation and action spaces to the `RLEnv` class. Some
standalone scripts were using these and were erroring out since they
were not implemented.

## Type of change

- Bug fix (non-breaking change which fixes an issue)

## Checklist

- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./orbit.sh --format`
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [x] I have updated the changelog and the corresponding version in the
extension's `config/extension.toml` file
parent 64f810fa
[package]
# Note: Semantic Versioning is used: https://semver.org/
version = "0.9.18"
version = "0.9.19"
# Description
title = "ORBIT framework for Robot Learning"
......
Changelog
---------
0.9.19 (2023-10-25)
~~~~~~~~~~~~~~~~~~~
Added
^^^^^
* Added Gym observation and action spaces for the :class:`omni.isaac.orbit.envs.RLEnv` class.
0.9.18 (2023-10-19)
~~~~~~~~~~~~~~~~~~
......
......@@ -96,6 +96,15 @@ class RLEnv(BaseEnv, gym.Env):
# print the environment information
print("[INFO]: Completed setting up the environment...")
# setup the action and observation spaces for Gym
# -- observation space
self.observation_space = gym.spaces.Dict()
for group_name, group_dim in self.observation_manager.group_obs_dim.items():
self.observation_space[group_name] = gym.spaces.Box(low=-np.inf, high=np.inf, shape=group_dim)
# -- action space (unbounded since we don't impose any limits)
action_dim = sum(self.action_manager.action_term_dim)
self.action_space = gym.spaces.Box(low=-np.inf, high=np.inf, shape=(action_dim,))
# perform randomization at the start of the simulation
self.randomization_manager.randomize(mode="startup")
# extend UI elements
......
......@@ -69,7 +69,9 @@ class TerrainSceneCfg(InteractiveSceneCfg):
debug_vis=True,
mesh_prim_paths=["/World/ground"],
)
contact_forces = ContactSensorCfg(prim_path="{ENV_REGEX_NS}/Robot/.*", history_length=3, debug_vis=True)
contact_forces = ContactSensorCfg(
prim_path="{ENV_REGEX_NS}/Robot/.*", history_length=3, track_air_time=True, debug_vis=True
)
# lights
light = AssetBaseCfg(
prim_path="/World/light",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment