qgallouedec / panda-gym

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

train_push seems to be broken after merging gymnasium branch #38

Closed mfouadthabet closed 1 year ago

mfouadthabet commented 1 year ago

Describe the bug

The following error occurs on trying to run train_push

assert not hasattr(obs_space, "spaces"), f"Unsupported structured space '{type(obs_space)}'" AssertionError: Unsupported structured space '<class 'gymnasium.spaces.dict.Dict'>'

To Reproduce

Provide a minimal code :

import gymnasium as gym
from stable_baselines3 import DDPG, HerReplayBuffer

import panda_gym

env = gym.make("PandaPush-v3")

model = DDPG(policy="MultiInputPolicy", env=env, replay_buffer_class=HerReplayBuffer, verbose=1)
...

System

qgallouedec commented 1 year ago

Stable-baselines3 is not yet compatible with gymnasium v0.26 (see the related PR: https://github.com/DLR-RM/stable-baselines3/pull/780). Therefore, you can't use panda-gym v3 with SB3 for the moment. You have to upgrade to panda-gym version 2.0.0.

pip install panda-gym==2.0.0

and use PandaPush-v2.

qgallouedec commented 1 year ago

The following error occurs on trying to run train_push

I left this file in the repo to anticipate, but we will have to wait a bit for it to be functional.

qgallouedec commented 1 year ago

Disclaimer added: https://github.com/qgallouedec/panda-gym/commit/09ecfb6d57e0b516ae248ef1d54a4cc7b3db71f1