Skip to content

Commit

Permalink
[gym/core] Fix corrupted robot proxy if model changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
duburcqa committed Mar 21, 2024
1 parent a51cc10 commit 859b0e2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions python/gym_jiminy/common/gym_jiminy/common/envs/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,7 @@ def reset(self, # type: ignore[override]

# Re-initialize some shared memories.
# It is necessary because the robot may have changed.
self.robot = self.simulator.robot
self.robot_state = self.simulator.robot_state
self.sensor_measurements = OrderedDict(self.robot.sensor_measurements)

Expand Down

0 comments on commit 859b0e2

Please sign in to comment.