def rel_obs(obs):
    """ Provides relative position of neighbours wrt one another

    Parameters
    ----------
    obs :  Tensor [num_tracks, 2]
        x-y positions of all agents

    Returns
    -------
    relative : Tensor [num_tracks, num_tracks, 2]
    """
    unfolded = obs.unsqueeze(0).repeat(obs.size(0), 1, 1)
    relative = unfolded - obs.unsqueeze(1)
    return relative