Skip to content

Commit

Permalink
Merge pull request #88 from Tigul/fix-object-remove
Browse files Browse the repository at this point in the history
[bullet-world] fixes in remove method to avoid crashes
  • Loading branch information
Tigul authored Aug 8, 2023
2 parents 72dd8c0 + ba4a710 commit 079245e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/pycram/bullet_world.py
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,10 @@ def remove(self) -> None:
# has a reference to the shadow world
if self.world.shadow_world != None:
self.world.world_sync.remove_obj_queue.put(self)
self.world.world_sync.remove_obj_queue.join()
p.removeBody(self.id, physicsClientId=self.world.client_id)
if BulletWorld.robot == self:
BulletWorld.robot = None

def attach(self, object: Object, link: Optional[str] = None, loose: Optional[bool] = False) -> None:
"""
Expand Down

0 comments on commit 079245e

Please sign in to comment.