def encode_dist_anchor(gt_ctr, gt_offset, anchor_ctr, anchor_offset):
    """
    Encoding Distance anchors 
    :param:
        gt_ctr: [bs, points_num, 3]
        gt_offset: [bs, points_num, 3]
        anchor_ctr: [bs, points_num, 3]
        anchor_offset: [bs, points_num, 3]
    :return:
        encoded_ctr: [bs, points_num, 3]
        encoded_offset: [bs, points_num, 3]
    """
    encoded_ctr = gt_ctr - anchor_ctr
    encoded_offset = (gt_offset - anchor_offset) / anchor_offset
    return encoded_ctr, encoded_offset