-
-
Notifications
You must be signed in to change notification settings - Fork 95
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
Fixes Fetch and Robotic environments initial state issues in 1.3.0 #256
Conversation
Should I update the test file as well? The one I'm using to test it is comparing the |
In gymnasium we have this test, but I do not believe this applies to these environments because we do not have reset noise scale parameter. |
Specific to the impacted environments, the problem would be the randomized object location in |
Add the test |
also |
I added the test in |
I'm currently looking into how to fix starting position of the "Fetch" environment. |
This PR is for fixing the Fetch-V3 environments' incorrect starting position introduced in the deterministic rollout fix in 1.3.0. I'm working with the maintainer to incorporate the fix to the main branch. Are you facing the "asymmetrical starting position" in If you are still facing that issue in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking Good, we now update the changelog of the environmets
example:
Gymnasium-Robotics/gymnasium_robotics/envs/fetch/pick_and_place.py
Lines 131 to 136 in 3719d9d
## Version History | |
* v3: Fixed bug: `env.reset()` not properly resetting the internal state. Fetch environments now properly reset their state (related [GitHub issue](https://github.com/Farama-Foundation/Gymnasium-Robotics/issues/207)). | |
* v2: the environment depends on the newest [mujoco python bindings](https://mujoco.readthedocs.io/en/latest/python.html) maintained by the MuJoCo team in Deepmind. | |
* v1: the environment depends on `mujoco_py` which is no longer maintained. | |
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apply the change to all the environments, I think this is the last change
Thanks at @kuds For the validation. The next release should be around New Years. |
Adding back the lines described in #251 to fix the initial state changes introduced in
gymnasium-robotics>=1.3.0, <=1.3.1
.Description
Adding back removed data setting lines removed in 1.3.0. Following Gymnasium's
mujoco_env.py
workflow, the procedure to reset an environment for Fetch and Robotic environments are:mujoco._mj_resetData(self.model, self.data)
self.data
to the saved initial data.mujoco.mf_forward(self.model, self.data)
The second step changes for different environments. Changes in 1.3.0 removed the second step. The third step is called in
set_state()
inmujoco_env.py
.Update impacted
Fetch
environments to V4 andHandReach
environment to V3. Other Shadow Dexterous Hand environments are not impacted since they inheritMujocoManipulateEnv
which has a overridden_reset_sim()
.Fixes #251
Type of change
Please delete options that are not relevant.
Screenshots
Please attach before and after screenshots of the change if applicable.
Checklist:
pre-commit
checks withpre-commit run --all-files
(seeCONTRIBUTING.md
instructions to set it up)