Update quadx_ball_in_cup_env.py#80
Closed
NishantChandna1403 wants to merge 1 commit intojjshoots:masterfrom
Closed
Update quadx_ball_in_cup_env.py#80NishantChandna1403 wants to merge 1 commit intojjshoots:masterfrom
NishantChandna1403 wants to merge 1 commit intojjshoots:masterfrom
Conversation
jjshoots
reviewed
Feb 28, 2025
Comment on lines
+264
to
+267
| #Negative Reward For High Yaw rate, To prevent high yaw while training | ||
| yaw_rate = abs(self.env.state(0)[0][2]) # Assuming z-axis is the last component | ||
| yaw_rate_penalty = 0.01 * yaw_rate**2# Add penalty for high yaw rate | ||
| self.reward -= yaw_rate_penalty # You can adjust the coefficient (0.01) as needed |
Owner
There was a problem hiding this comment.
This should be placed in the below if not self.sparse_reward conditional.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Improving Reward Function, Adding negative reward for yaw rates to prevent high yaw while training.