Skip to content

Commit c0fa708

Browse files
yun-longchris-la-humalab
authored andcommitted
fix nan bug in hover_env due to numerical instability of angular dynamics (Genesis-Embodied-AI#1348)
1 parent ace388e commit c0fa708

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

examples/drone/hover_env.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ def __init__(self, num_envs, env_cfg, obs_cfg, reward_cfg, command_cfg, show_vie
9090
# build scene
9191
self.scene.build(n_envs=num_envs)
9292

93+
# Set damping to a small value to avoid numerical instability
94+
self.drone.set_dofs_damping(torch.tensor([0.0, 0.0, 0.0, 1e-4, 1e-4, 1e-4]))
95+
9396
# prepare reward functions and multiply reward scales by dt
9497
self.reward_functions, self.episode_sums = dict(), dict()
9598
for name in self.reward_scales.keys():

0 commit comments

Comments
 (0)