Skip to content

[Bug Report] Fetch V3 initial state problem #251

@wjxgeorge

Description

@wjxgeorge

If you are submitting a bug report, please fill in the following details and use the tag [bug].

Describe the bug
The recent fix to Fetch environment for fixing the reproducibility issue changed the initial position for the environment.

A previously trained RL agent using V2 environment/dataset cannot perform well in V3 environment.

A simple fix is to add back

self.data.time = self.initial_time
self.data.qpos[:] = np.copy(self.initial_qpos)
self.data.qvel[:] = np.copy(self.initial_qvel)
if self.model.na != 0:
    self.data.act[:] = None

after self._mujoco.mj_resetData(self.model, self.data) in _reset_sim(self).

This will make the robot's start position the same as described in V2's documentation.

After adding the lines back, I can reproduce the same result using V2's agent/dataset in V3 environment.

Code example
Not applicable here.

System Info
Describe the characteristic of your environment:

  • gymnasium & gymnasium robotics installed through pip
  • Ubuntu 22.04
  • Python 3.9

Additional context
None

Checklist

  • I have checked that there is no similar issue in the repo (required)

Edit:
Fixing Typos.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions