-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial state distribution bug when resetting the environment #20
Comments
Hi Jack, I figured out the same thing. I think this issue can be fixed by adding these lines in the reset. player.env.task.gym.simulate(player.env.task.sim) This way we are always getting the new rigid_body values. |
I think that this causes another issue since gym.simulate will step all the environments. So maybe it solves the problem for environments that are to be reset, but the other ones that are not done will skip the next state that results from the last action. |
Yes, unfortunately this causes issues where sometimes the simulation will be advanced by two timesteps instead of one. This will probably hurt the training process by introducing some randomness into the dynamics. I'm not sure what a good solution is in this case with IsaacGym. I'm open to suggestions! |
Hi guys, I fixed this bug, plz see my PR! |
Hello,
thank you for the amazing work. I noticed that when resetting the environment, the initial state is different each time even if stateinit is set to Default or Start.
When looking deep into the code, it seems that the initial state is different because the positions of the rigid bodies are kept the same as before the reset. In the function _reset_env_tensors(self, env_ids) in humanoid.py, only root state and dof states are being reset. Appearently, the current version of IsaacGym does not allow for setting positions for rigid bodies according to the doc.
The text was updated successfully, but these errors were encountered: