dist_metrics.py 文件源码

python
阅读 37 收藏 0 点赞 0 评论 0

项目:autolab_core 作者: BerkeleyAutomation 项目源码 文件源码
def abs_angle_diff(v_i, v_j):
    """ 
    Returns the absolute value of the angle between two 3D vectors.

    Parameters
    ----------
    v_i : :obj:`numpy.ndarray`
        the first 3D array
    v_j : :obj:`numpy.ndarray`
        the second 3D array
    """
    # compute angle distance
    dot_prod = min(max(v_i.dot(v_j), -1), 1)
    angle_diff = np.arccos(dot_prod)
    return np.abs(angle_diff)

# dictionary of distance functions
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号