Unverified Commit b663ad17 authored by Kousheek Chakraborty's avatar Kousheek Chakraborty Committed by GitHub

Initialize extras dict before loading managers (#2178)

# Description

Unable to add new entries to self.extras dictionary in ManagerBasedEnv
because the dictionary was initialised after loading the managers.

Fixes #2177 

## 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
- [ ] 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
parent 3c3103f6
...@@ -67,6 +67,7 @@ Guidelines for modifications: ...@@ -67,6 +67,7 @@ Guidelines for modifications:
* Johnson Sun * Johnson Sun
* Kaixi Bao * Kaixi Bao
* Kourosh Darvish * Kourosh Darvish
* Kousheek Chakraborty
* Lionel Gulich * Lionel Gulich
* Louis Le Lay * Louis Le Lay
* Lorenz Wellhausen * Lorenz Wellhausen
......
...@@ -122,6 +122,9 @@ class ManagerBasedEnv: ...@@ -122,6 +122,9 @@ class ManagerBasedEnv:
# counter for simulation steps # counter for simulation steps
self._sim_step_counter = 0 self._sim_step_counter = 0
# allocate dictionary to store metrics
self.extras = {}
# generate scene # generate scene
with Timer("[INFO]: Time taken for scene creation", "scene_creation"): with Timer("[INFO]: Time taken for scene creation", "scene_creation"):
self.scene = InteractiveScene(self.cfg.scene) self.scene = InteractiveScene(self.cfg.scene)
...@@ -170,9 +173,6 @@ class ManagerBasedEnv: ...@@ -170,9 +173,6 @@ class ManagerBasedEnv:
# if no window, then we don't need to store the window # if no window, then we don't need to store the window
self._window = None self._window = None
# allocate dictionary to store metrics
self.extras = {}
# initialize observation buffers # initialize observation buffers
self.obs_buf = {} self.obs_buf = {}
......
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