Skip to content

Commit

Permalink
[gym/common] Do not enforce 'dtMax'. (#727)
Browse files Browse the repository at this point in the history
  • Loading branch information
duburcqa committed Feb 18, 2024
1 parent f1535d1 commit 68197a2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
1 change: 0 additions & 1 deletion data/bipedal_robots/atlas/atlas_v4_options.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ tolRel = 1e-4
sensorsUpdatePeriod = 0.005
controllerUpdatePeriod = 0.005
logInternalStepperSteps = false
successiveIterFailedMax = 1000
randomSeedSeq = [0,]

# ============== Contact dynamics ===============
Expand Down
11 changes: 7 additions & 4 deletions python/gym_jiminy/common/gym_jiminy/common/envs/env_generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@
from .internal import loop_interactive


# Maximum realtime slowdown of simulation steps before triggering timeout error
TIMEOUT_RATIO = 50

# Absolute tolerance when checking that observations are valid
OBS_CONTAINS_TOL = 0.01

# Define universal bounds for the observation space
FREEFLYER_POS_TRANS_MAX = 1000.0
FREEFLYER_VEL_LIN_MAX = 1000.0
Expand All @@ -73,8 +79,6 @@
SENSOR_GYRO_MAX = 100.0
SENSOR_ACCEL_MAX = 10000.0

OBS_CONTAINS_TOL = 0.01


LOGGER = logging.getLogger(__name__)

Expand Down Expand Up @@ -1286,13 +1290,12 @@ def _setup(self) -> None:
# Configure the low-level integrator
engine_options = self.simulator.engine.get_options()
engine_options["stepper"]["iterMax"] = 0
engine_options["stepper"]["dtMax"] = min(0.02, self.step_dt)
if self.debug:
engine_options["stepper"]["verbose"] = True
engine_options["stepper"]["logInternalStepperSteps"] = True

# Set maximum computation time for single internal integration steps
engine_options["stepper"]["timeout"] = 2.0
engine_options["stepper"]["timeout"] = self.step_dt * TIMEOUT_RATIO
if self.debug:
engine_options["stepper"]["timeout"] = 0.0

Expand Down

0 comments on commit 68197a2

Please sign in to comment.