Skip to content

Commit

Permalink
Adds observation and action spaces to the RLEnv class (#206)
Browse files Browse the repository at this point in the history
# 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
  • Loading branch information
Mayankm96 authored Oct 25, 2023
1 parent 64f810f commit 9673725
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
2 changes: 1 addition & 1 deletion source/extensions/omni.isaac.orbit/config/extension.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]

# Note: Semantic Versioning is used: https://semver.org/
version = "0.9.18"
version = "0.9.19"

# Description
title = "ORBIT framework for Robot Learning"
Expand Down
9 changes: 9 additions & 0 deletions source/extensions/omni.isaac.orbit/docs/CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
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)
~~~~~~~~~~~~~~~~~~

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,15 @@ def __init__(self, cfg: RLEnvCfg):
# 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 9673725

Please sign in to comment.