示例#1
0
 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)
示例#2
0
    def set_explicit_handling(self, value: int) -> None:
        """Set explicit handling flags.

        :param value: A flag to enable(1) or disable(0) explicit handling.
        """
        sim.simSetExplicitHandling(self._handle, value)