qgallouedec / panda-gym

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

pybullet.error: Not connected to physics server. when closing multiple envs #7

Closed kbys-t closed 2 years ago

kbys-t commented 2 years ago

I got the following error when creating and closing multiple environments. Perhaps, at close() function in PyBullet class, you need to call self.physics_client.disconnect() to specify the client id, instead of p.disconnect().

qgallouedec commented 2 years ago

Thank you for reporting this bug. Indeed, I should use self.physics_client.disconnect() instead of p.disconnect(). I am correcting it.