-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bugfix/128 force action desat reset #129
Conversation
@@ -126,7 +129,7 @@ def __init__( | |||
super().__init__(*args, **kwargs) | |||
setattr(self, fsw_action + "_duration", action_duration) | |||
|
|||
def act(self, prev_action_key=None) -> str: | |||
def act(self, prev_action_key=None, always_reset=always_reset) -> str: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does always_reset
need to be an argument here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't. I agree that it is better to remove it from there.
env.step(0) | ||
current_speeds = env.satellite.dynamics.wheel_speeds | ||
assert np.linalg.norm(current_speeds) < np.linalg.norm(init_speeds) | ||
init_speeds = current_speeds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good test!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
fb0e04f
to
00fd0cb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Description
Closes #128
Action_desat was not reducing reaction wheels' momentum if called more than once in a row. This change forces a reset of the action_desat every time it is tasked, resulting in the expected behavior.
Type of change
How should this pull request be reviewed?
How Has This Been Tested?
Please describe the tests that you ran to verify your changes.
Passes Tests
pytest --cov bsk_rl/envs/general_satellite_tasking --cov-report term-missing tests/unittest
pytest --cov bsk_rl/envs/general_satellite_tasking --cov-report term-missing tests/integration
pytest tests/examples
Test Configuration
Checklist:
Issue #XXX: Message
and have a useful message