def _is_arrive_destination(self, vehicle, goal_name=None):
        """
        Compared to the original function, here we look up the navigation from goal_manager.

        Args:
            vehicle: The BaseVehicle instance.
            goal_name: The name of the goal. If None, return True if any goal is arrived.

        Returns:
            flag: Whether this vehicle arrives its destination.
        """

        if self.config["use_multigoal_intersection"]:
            if goal_name is None:
                ret = False
                for name in self.engine.goal_manager.goals.keys():
                    ret = ret or self._is_arrive_destination(vehicle, name)
                return ret

            if goal_name == "default":
                navi = self.agent.navigation
            else:
                navi = self.engine.goal_manager.get_navigation(goal_name)

        else:
            navi = vehicle.navigation

        long, lat = navi.final_lane.local_coordinates(vehicle.position)
        flag = (navi.final_lane.length - 5 < long < navi.final_lane.length + 5) and (
            navi.get_current_lane_width() / 2 >= lat >=
            (0.5 - navi.get_current_lane_num()) * navi.get_current_lane_width()
        )
        return flag

        Compared to the original function, here we look up the navigation from goal_manager.

        Args:
            vehicle: The BaseVehicle instance.
            goal_name: The name of the goal. If None, return True if any goal is arrived.

        Returns:
            flag: Whether this vehicle arrives its destination.
        
metadrive/envs/multigoal_intersection.py