def assess_collision(self): """Silent detection of the robot base with all other entities present in the scene. :return: True if collision is detected """ return sim.simCheckCollision(self._collision_collection, sim.sim_handle_all) == 1
def check_arm_collision(self, obj: 'Object' = None) -> bool: """Checks whether two entities are colliding. :param obj: The other collidable object to check collision against, or None to check against all collidable objects. Note that objects must be marked as collidable! :return: If the object is colliding. """ handle = sim.sim_handle_all if obj is None else obj.get_handle() return sim.simCheckCollision(self._collision_collection, handle) == 1
def check_collision(self, obj: 'Object' = None) -> bool: """Checks whether two entities are colliding. :param obj: The other collidable object to check collision against, or None to check against all collidable objects. Note that objects must be marked as collidable! :return: If the object is colliding. """ handle = sim.sim_handle_all if obj is None else obj.get_handle() for ob in self.get_objects_in_tree(exclude_base=False): ob_handle = ob._handle if sim.simCheckCollision(ob_handle, handle): return True return False