qgallouedec / panda-gym

Set of robotic environments based on PyBullet physics engine and gymnasium.
MIT License
492 stars 106 forks source link

Typo in the `core.py` script #75

Closed mahaozhe closed 9 months ago

mahaozhe commented 10 months ago

Describe the bug

In the envs/core.py script, some the goals are defined inconsistently.

To Fix

  1. at line 236:
desired_goal_shape = observation["achieved_goal"].shape

=>

desired_goal_shape = observation["desired_goal"].shape
  1. and the line 240-241:
desired_goal=spaces.Box(-10.0, 10.0, shape=achieved_goal_shape, dtype=np.float32),
achieved_goal=spaces.Box(-10.0, 10.0, shape=desired_goal_shape, dtype=np.float32),

=>

desired_goal=spaces.Box(-10.0, 10.0, shape=desired_goal_shape, dtype=np.float32),
achieved_goal=spaces.Box(-10.0, 10.0, shape=achieved_goal_shape, dtype=np.float32),

I found to fix this is very important, especially if we customize some environments, thanks a lot!

qgallouedec commented 10 months ago

thanks for reporting! Do you mind opening a PR to fix this?