Skip to content

Update quadx_waypoints_env.py#81

Closed
NishantChandna1403 wants to merge 1 commit intojjshoots:masterfrom
NishantChandna1403:patch-4
Closed

Update quadx_waypoints_env.py#81
NishantChandna1403 wants to merge 1 commit intojjshoots:masterfrom
NishantChandna1403:patch-4

Conversation

@NishantChandna1403
Copy link
Contributor

Improving Reward Function, Adding negative reward for yaw rates to prevent high yaw while training.

Comment on lines +185 to +187
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
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be placed in the above if not self.sparse_reward conditional.

@jjshoots jjshoots closed this Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments