l5kit.planning.utils module¶
- l5kit.planning.utils.within_range(ego_centroid: numpy.ndarray, ego_extent: numpy.ndarray, agent_centroid: numpy.ndarray, agent_extent: numpy.ndarray) numpy.ndarray ¶
This function will check if the agent is within range of the ego. It accepts as input a vectorized form with shapes N,D or a flat vector as well with shapes just D.
- Parameters
ego_centroid – the ego centroid (shape: 2)
ego_extent – the ego extent (shape: 3)
agent_centroid – the agent centroid (shape: N, 2)
agent_extent – the agent extent (shape: N, 3)
- Returns
array with True if within range, False otherwise (shape: N)