qgallouedec / panda-gym

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

Make the episode lasts longer than 50 timesteps. #10

Closed samiulextreem closed 2 years ago

samiulextreem commented 2 years ago

Ok.pandareach env is running max 50 step and after that the env is returning done true. I intent to run the env for longer say 300 but can not find a way to do that. Can anybody provide a solution for that?

qgallouedec commented 2 years ago

Hello @samiulextreem ,

The easiest way to prevent the environment from returning done=True after 50 timesteps would be to manually register your environment. Here is how to do it:

import gym
import panda_gym

gym.register(id="PandaReachLonger-v1", entry_point="panda_gym.envs:PandaReachEnv", max_episode_steps=300)

# Then, as usual:
env = gym.make("PandaReachLonger-v1")
env.reset()
# ...