def get_ade(forecasted_trajectory: torch.Tensor, gt_trajectory: torch.Tensor) -> float:
    """Compute Average Displacement Error.
    Args:
        forecasted_trajectory: Predicted trajectory with shape [fut_ts, 2]
        gt_trajectory: Ground truth trajectory with shape [fut_ts, 2]
    Returns:
        ade: Average Displacement Error
    """
    pred_len = forecasted_trajectory.shape[0]
    ade = float(
        sum(
            torch.sqrt(
                (forecasted_trajectory[i, 0] - gt_trajectory[i, 0]) ** 2
                + (forecasted_trajectory[i, 1] - gt_trajectory[i, 1]) ** 2
            )
            for i in range(pred_len)
        )
        / pred_len
    )
    return ade
Compute Average Displacement Error.
    Args:
        forecasted_trajectory: Predicted trajectory with shape [fut_ts, 2]
        gt_trajectory: Ground truth trajectory with shape [fut_ts, 2]
    Returns:
        ade: Average Displacement Error
    
projects/mmdet3d_plugin/core/evaluation/metric_motion.py