"""Keep native two-time source/receiver combinations outside the near singularity. This is distinct from same-time body collision checking. The frozen RIR approximation evaluates emission and reception positions at different knots. Only combinations needed by the finite convolution horizon are inspected. """ from __future__ import annotations import numpy as np from .common import SR,position,rir_nodes def minimum_kernel_separation(episode,ir_time_s=2.5): minimum=float('inf') detail=None for source in episode['humans']+episode['playback_sources']: sn=rir_nodes(source) for i,te in enumerate(sn): support_lo=sn[i-1] if i else 0. support_hi=sn[i+1] if i+1a] if not spans: continue for receiver in episode['robots']: if source['entity_id']==receiver['entity_id']: continue rn=rir_nodes(receiver) for j,tr in enumerate(rn): left=rn[j-1] if j else 0. right=rn[j+1] if j+1a and left