def bboxes_intersect(points1, points2, dim=1):
    """Compute whether bounding boxes of two point clouds intersect."""
    min1 = points1.min(dim)[0]
    max1 = points1.max(dim)[0]
    min2 = points2.min(dim)[0]
    max2 = points2.max(dim)[0]
    center1 = (min1 + max1)/2
    center2 = (min2 + max2)/2
    size1 = max1 - min1
    size2 = max2 - min2
    return ((center1 - center2).abs() * 2 <= size1 + size2).all(-1)