Skip to content

Commit

Permalink
fix noise
Browse files Browse the repository at this point in the history
  • Loading branch information
WT-MM committed Jan 2, 2025
1 parent 3574ef1 commit 63ed694
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sim/envs/base/legged_robot.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ def _resample_default_positions(self):
self.default_dof_pos[i] = self.cfg.init_state.default_joint_angles[name]

if self.add_noise:
self.default_dof_pos[i] += torch.randn(1) * self.cfg.noise.noise_ranges.default_pos
self.default_dof_pos[i] += torch.randn(1).item() * self.cfg.noise.noise_ranges.default_pos

# ----------------------------------------
def _init_buffers(self):
Expand Down
2 changes: 1 addition & 1 deletion sim/envs/humanoids/gpr_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ class noise_scales:
quat = 0.03
height_measurements = 0.1

class nosie_ranges:
class noise_ranges:
default_pos = 0.03 # +- 0.05 rad

class init_state(LeggedRobotCfg.init_state):
Expand Down

0 comments on commit 63ed694

Please sign in to comment.