Unverified Commit f640376b authored by renezurbruegg's avatar renezurbruegg Committed by GitHub

Fix action indexing in the action manager (#23)

# Description

Fixes action indexing for multiple actions. Currently all successive
actions mimic the first one due to an indexing error.

## 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`
- [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 541dd06d
...@@ -224,6 +224,7 @@ class ActionManager(ManagerBase): ...@@ -224,6 +224,7 @@ class ActionManager(ManagerBase):
for term in self._terms: for term in self._terms:
term_actions = action[:, idx : idx + term.action_dim] term_actions = action[:, idx : idx + term.action_dim]
term.process_actions(term_actions) term.process_actions(term_actions)
idx += term.action_dim
def apply_action(self) -> None: def apply_action(self) -> None:
"""Applies the actions to the environment/simulation. """Applies the actions to the environment/simulation.
......
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