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 vrep.simCheckCollision(self._collision_collection, vrep.sim_handle_all) == 1
def check_collision(self, obj: Union['Object', ObjectType]) -> bool: """Checks whether two entities are colliding. :param obj: The other collidable object to check collision against, or ObjectType.ALL to check against all collidable objects. :return: If the object is colliding. """ return vrep.simCheckCollision(self._handle, obj.get_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 = vrep.sim_handle_all if obj is None else obj.get_handle() return vrep.simCheckCollision(self._handle, handle) == 1