Skip to content

Commit

Permalink
Fixes noise_model initialized in direct_marl_env (#1480)
Browse files Browse the repository at this point in the history
# Description

This change fixes bugs in `DirectMARLEnv` class, where previously
`_action_noise_model` and `_observation_noise_model` cannot successfully
initialized when the noise-model-cfg passed in.

## 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
`./isaaclab.sh --format`
- [x] 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
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there

---------

Signed-off-by: Kelly Guo <[email protected]>
Signed-off-by: Kelly Guo <[email protected]>
Co-authored-by: zhouhaoran <[email protected]>
Co-authored-by: Kelly Guo <[email protected]>
Co-authored-by: Kelly Guo <[email protected]>
  • Loading branch information
4 people authored Dec 5, 2024
1 parent 63bd428 commit b0312db
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ Guidelines for modifications:
* Felix Yu
* Gary Lvov
* Giulio Romualdi
* Haoran Zhou
* HoJin Jeon
* Jan Kerner
* Jean Tampon
Expand Down
2 changes: 1 addition & 1 deletion source/extensions/omni.isaac.lab/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.27.17"
version = "0.27.18"

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

0.27.18 (2024-12-04)
~~~~~~~~~~~~~~~~~~~~

Fixed
^^^^^

* Fixed the order of the incoming parameters in :class:`omni.isaac.lab.envs.DirectMARLEnv` to correctly use ``NoiseModel`` in marl-envs.


0.27.17 (2024-12-02)
~~~~~~~~~~~~~~~~~~~~

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,13 @@ def __init__(self, cfg: DirectMARLEnvCfg, render_mode: str | None = None, **kwar
# setup noise cfg for adding action and observation noise
if self.cfg.action_noise_model:
self._action_noise_model: dict[AgentID, NoiseModel] = {
agent: noise_model.class_type(self.num_envs, noise_model, self.device)
agent: noise_model.class_type(noise_model, num_envs=self.num_envs, device=self.device)
for agent, noise_model in self.cfg.action_noise_model.items()
if noise_model is not None
}
if self.cfg.observation_noise_model:
self._observation_noise_model: dict[AgentID, NoiseModel] = {
agent: noise_model.class_type(self.num_envs, noise_model, self.device)
agent: noise_model.class_type(noise_model, num_envs=self.num_envs, device=self.device)
for agent, noise_model in self.cfg.observation_noise_model.items()
if noise_model is not None
}
Expand Down

0 comments on commit b0312db

Please sign in to comment.