def __init__(self, name_or_handle: Union[str, int]): raise PyRepError( 'Currently there is an error in CoppeliaSim with distance objects. ' 'As soon as CoppeliaSim resolves this issue, this error will be ' 'removed.') if isinstance(name_or_handle, int): self._handle = name_or_handle else: self._handle = sim.simGetDistanceHandle(name_or_handle) # The entity needs to be set as explicit handling for reads to work. if not sim.simGetExplicitHandling(self._handle): sim.simSetExplicitHandling(self._handle, 1)
def get_explicit_handling(self) -> int: """Get explicit handling flags. :return: The flag: enabled(1) or disabled(0). """ return sim.simGetExplicitHandling(self._handle)