Skip to content

Commit

Permalink
Fix action indexing in the action manager (#23)
Browse files Browse the repository at this point in the history
# 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
  • Loading branch information
renezurbruegg committed Nov 14, 2023
1 parent 541dd06 commit f640376
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ def process_action(self, action: torch.Tensor):
for term in self._terms:
term_actions = action[:, idx : idx + term.action_dim]
term.process_actions(term_actions)
idx += term.action_dim

def apply_action(self) -> None:
"""Applies the actions to the environment/simulation.
Expand Down

0 comments on commit f640376

Please sign in to comment.