From a2d2a8edc0132f777919cc8bea3ba9ff0459cf83 Mon Sep 17 00:00:00 2001 From: Bart Moyaers Date: Mon, 24 Jun 2019 13:32:59 +0200 Subject: [PATCH] faster thrown object removal --- .../deep_mimic/env/pybullet_deep_mimic_env.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/examples/pybullet/gym/pybullet_envs/deep_mimic/env/pybullet_deep_mimic_env.py b/examples/pybullet/gym/pybullet_envs/deep_mimic/env/pybullet_deep_mimic_env.py index 100e208d7..238b0c18d 100644 --- a/examples/pybullet/gym/pybullet_envs/deep_mimic/env/pybullet_deep_mimic_env.py +++ b/examples/pybullet/gym/pybullet_envs/deep_mimic/env/pybullet_deep_mimic_env.py @@ -359,7 +359,12 @@ class PyBulletDeepMimicEnv(Env): self._humanoid.thrown_body_ids.append(body) def removeThrownObjects(self): + # Disable gui so that object removal does not cause stutter + self._pybullet_client.configureDebugVisualizer(self._pybullet_client.COV_ENABLE_RENDERING,0) + for objectId in self._humanoid.thrown_body_ids: self._pybullet_client.removeBody(objectId) - self._humanoid.thrown_body_ids = [] \ No newline at end of file + self._humanoid.thrown_body_ids = [] + + self._pybullet_client.configureDebugVisualizer(self._pybullet_client.COV_ENABLE_RENDERING,1) \ No newline at end of file