def get_fde(forecasted_trajectory: torch.Tensor, gt_trajectory: torch.Tensor) -> float:
    """Compute Final Displacement Error.
    Args:
        forecasted_trajectory: Predicted trajectory with shape [fut_ts, 2]
        gt_trajectory: Ground truth trajectory with shape [fut_ts, 2]
    Returns:
        fde: Final Displacement Error
    """
    fde = float(
        torch.sqrt(
            (forecasted_trajectory[-1, 0] - gt_trajectory[-1, 0]) ** 2
            + (forecasted_trajectory[-1, 1] - gt_trajectory[-1, 1]) ** 2
        )
    )
    return fde
Compute Final Displacement Error.
    Args:
        forecasted_trajectory: Predicted trajectory with shape [fut_ts, 2]
        gt_trajectory: Ground truth trajectory with shape [fut_ts, 2]
    Returns:
        fde: Final Displacement Error
    
projects/mmdet3d_plugin/core/evaluation/metric_motion.py