pybullet.error: Not connected to physics server.

Official Python bindings with a focus on reinforcement learning and robotics.
Post Reply
Standing
Posts: 2
Joined: Thu Sep 01, 2022 11:46 am

pybullet.error: Not connected to physics server.

Post by Standing »

When I test pybullet environment in PPO Algorithm, I got this issue. But I train in the pybullet environment, There is no problem here.

Code: Select all

  File "/home/me/PPO/src/policy_gradients/agent.py", line 447, in run_trajectories
    initial_states = self.reset_envs(envs)
  File "/home/me/PPO/src/policy_gradients/agent.py", line 383, in reset_envs
    return cpu_tensorize([env.reset() for env in envs]).unsqueeze(1)
  File "/home/me/PPO/src/policy_gradients/agent.py", line 383, in <listcomp>
    return cpu_tensorize([env.reset() for env in envs]).unsqueeze(1)
  File "/home/me/PPO/src/policy_gradients/custom_env.py", line 99, in reset
    start_state = self.env.reset()
  File "/home/me/anaconda3/envs/state/lib/python3.7/site-packages/gym/wrappers/time_limit.py", line 27, in reset
    return self.env.reset(**kwargs)
  File "/home/me/anaconda3/envs/state/lib/python3.7/site-packages/pybullet_envs/gym_locomotion_envs.py", line 30, in reset
    self._p.restoreState(self.stateId)
pybullet.error: Not connected to physics server.

Post Reply