Skip to content

Commit

Permalink
turn off other penalties
Browse files Browse the repository at this point in the history
  • Loading branch information
codekansas committed Apr 3, 2024
1 parent ec78264 commit e188cf7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
12 changes: 8 additions & 4 deletions sim/humanoid_gym/envs/humanoid_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,14 @@ class scales: # noqa: N801
base_acc = 0.0

# Energy
torques = -1e-6
dof_vel = -5e-5
dof_acc = -1e-8
collision = -1e-2
# torques = -1e-6
# dof_vel = -5e-5
# dof_acc = -1e-8
# collision = -1e-2
torques = 0.0
dof_vel = 0.0
dof_acc = 0.0
collision = 0.0

class normalization: # noqa: N801
class obs_scales: # noqa: N801
Expand Down
4 changes: 3 additions & 1 deletion sim/humanoid_gym/envs/humanoid_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,9 @@ def _reward_base_height(self) -> Tensor:
"""
base_height = self.root_states[:, 2]
max_foot_height = self.rigid_state[:, self.feet_indices, 2].max(dim=1).values
return base_height - max_foot_height
height_diff = base_height - max_foot_height
height_diff[height_diff < 0.3] = 0.0 # No cheating.
return height_diff

def _reward_base_acc(self) -> Tensor:
"""Computes the reward based on the base's acceleration.
Expand Down

0 comments on commit e188cf7

Please sign in to comment.