-
Notifications
You must be signed in to change notification settings - Fork 271
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
Incorrect rendering of goal spheres in reach-v2
tasks
#467
Comments
Hi, Thanks for posting this, I was using the I tried adding |
what |
2.3.7 |
This is definitely something to look into, I will try and look into it
tomorrow or over the weekend
Reginald McLean (he/him)
Ph.D. Candidate, Department of Computer Science
Lead Maintainer of Meta-World
<https://github.com/Farama-Foundation/Metaworld/>
Toronto Metropolitan University <https://www.torontomu.ca/> (formerly
Ryerson University)
…On Wed, Apr 17, 2024 at 1:53 PM Emlyn ***@***.***> wrote:
2.3.7
—
Reply to this email directly, view it on GitHub
<#467 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ARLRRRKQ5BKDPRTBDBGMTSTY52ZJTAVCNFSM6AAAAABELBLJSKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRRHA4DMOBZGE>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Hi @emlynw and @jwbirkbeck thanks for letting us know about this issue. I am going to ask you to test the environments that you are using by making a slight modification to the reset function in sawyer_xyz_env.py in metaworld/envs/mujoco/sawyer_xyz/. It should look like this after adding one line:
def reset(self, seed=None, options=None):
self.curr_path_length = 0
obs, info = super().reset()
self.model.site('goal').pos = self._target_pos
mujoco.mj_forward(self.model, self.data)
self._prev_obs = obs[:18].copy()
obs[18:36] = self._prev_obs
obs = np.float64(obs)
return obs, info
|
Works for me in push-v2, thanks! |
Adding |
Ah yep, the goal is different. The following list of environments will pass with that fix:
|
This is going to be fixed by PR #473 |
Hi All,
I'm raising this for the
reach-v2
environment but it might apply to other tasks.When rendering all the available tasks using the below code, the red sphere does not change position. This leads users to mistakenly conclude the target position is the same across tasks.
I believe this is because the
reset_model
method only updatesself._target_pos
which has no impact on the rendering within MuJoCo. The reward function is therefore correct across tasks, but the rendering is incorrect.If this is correct, a likely fix is to add the a line to the end of the
reset_model
method:self._set_pos_site('goal', self._target_pos)
As a related issue, the potential confusion is made worse due to the
goal
parameter being a fixed constant (from theinit
,self.goal = np.array([-0.1, 0.8, 0.2])
). Under 'least surprise' I thinkself.goal
should provide the user with the same information asself._target_pos
.The text was updated successfully, but these errors were encountered: