Closed fgolemo closed 3 years ago
The self._terrain_type = "plane"
assignation is just a placeholder (otherwise this variable is None as no values are injected at the creation) before running the Reset
step of the child class (that then will overwrite this var): https://github.com/nicrusso7/rex-gym/blob/82dea26bcd8896da06240bcc3abd4de5b4696430/rex_gym/envs/rex_gym_env.py#L272.
After this, the variable is reassigned https://github.com/nicrusso7/rex-gym/blob/82dea26bcd8896da06240bcc3abd4de5b4696430/rex_gym/envs/rex_gym_env.py#L273
With your patch you won't be able to use the --terrain
flag.
Gotcha, sorry my mistake.
Oh but I just noticed something else: according to the gym specification, I think you shouldn't call self.reset() in the init function because it's standard that it's always called before the first loop (i.e. env = gym.make("xyz"); env.reset()
).
smol bugfix