Skip to content

Commit

Permalink
Reorganizes configuration files for locomotion velocity environment (i…
Browse files Browse the repository at this point in the history
…saac-sim#220)

# Description

This MR does the following:

* Changes the way environment and agent configs are handled. These are
now moved to their respective `env` folder.
* Replaces YAML file with configclasses for rsl_rl library
* Adds examples of other robots for locomotion-velocity task: anymal-b,
unitree-a1, and anymal-d (placeholder)

The new environment folder structure is as follows:

```
my_task (folder)
   |- mdp  (folder where all user's task-specific terms are stored)
   |- config
       |- robot_name_1  (folder)
            |- robot_specific_env_cfg.py
            | agents (folder)
                |- rsl_rl_cfg.py
                |- sb3_cfg.py
                |- ....
            |- __init__.py (register robot-specific tasks)
       |- robot_name_2 (folder)  
   |- my_task_env_cfg.py (base env config)
   |- my_task_env.py (base env -- optional -- should normally use RLEnv)
```

Fixes isaac-sim#142 

## Type of change

- New feature (non-breaking change which adds functionality)
- Breaking change (fix or feature that would cause existing
functionality to not work as expected)

## 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

---------

Co-authored-by: Nikita Rudin <[email protected]>
  • Loading branch information
Mayankm96 and nikitardn authored Nov 1, 2023
1 parent a9b5df1 commit e7d43de
Show file tree
Hide file tree
Showing 93 changed files with 1,830 additions and 1,047 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.29"
version = "0.9.30"

# Description
title = "ORBIT framework for Robot Learning"
Expand Down
12 changes: 12 additions & 0 deletions source/extensions/omni.isaac.orbit/docs/CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
Changelog
---------

0.9.30 (2023-11-01)
~~~~~~~~~~~~~~~~~~~

Fixed
^^^^^

* Added skipping of None values in the :class:`InteractiveScene` class when creating the scene from configuration
objects. Earlier, it was throwing an error when the user passed a None value for a scene element.
* Added ``kwargs`` to the :class:`RLEnv` class to allow passing additional arguments from gym registry function.
This is now needed since the registry function passes args beyond the ones specified in the constructor.


0.9.29 (2023-11-01)
~~~~~~~~~~~~~~~~~~~

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
UNITREE_A1_CFG = ArticulationCfg(
spawn=sim_utils.UsdFileCfg(
usd_path=f"{ISAAC_ORBIT_NUCLEUS_DIR}/Robots/Unitree/A1/a1_instanceable.usd",
activate_contact_sensors=False,
activate_contact_sensors=True,
rigid_props=sim_utils.RigidBodyPropertiesCfg(
disable_gravity=False,
retain_accelerations=False,
Expand All @@ -49,10 +49,11 @@
".*R_hip_joint": -0.1,
"F[L,R]_thigh_joint": 0.8,
"R[L,R]_thigh_joint": 1.0,
".*_calf_joint": -1.8,
".*_calf_joint": -1.5,
},
joint_vel={".*": 0.0},
),
soft_joint_pos_limit_factor=0.9,
actuators={
"base_legs": DCMotorCfg(
joint_names_expr=[".*"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class RLEnv(BaseEnv, gym.Env):
cfg: RLEnvCfg
"""Configuration for the environment."""

def __init__(self, cfg: RLEnvCfg):
def __init__(self, cfg: RLEnvCfg, **kwargs):
# initialize the base class to setup the scene.
super().__init__(cfg=cfg)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ def _add_entities_from_cfg(self):
for asset_name, asset_cfg in self.cfg.__dict__.items():
# skip keywords
# note: easier than writing a list of keywords: [num_envs, env_spacing, lazy_sensor_update]
if asset_name in InteractiveSceneCfg.__dataclass_fields__:
if asset_name in InteractiveSceneCfg.__dataclass_fields__ or asset_cfg is None:
continue
# resolve regex
asset_cfg.prim_path = asset_cfg.prim_path.format(ENV_REGEX_NS=self.env_regex_ns)
Expand Down
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.4.3"
version = "0.5.0"

# Description
title = "ORBIT Environments"
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

46 changes: 0 additions & 46 deletions source/extensions/omni.isaac.orbit_envs/data/rsl_rl/lift_ppo.yaml

This file was deleted.

Loading

0 comments on commit e7d43de

Please sign in to comment.