def METHOD_NAME(self, xOffset, yOffset, maxDistance, net):
    """Check if the vehicle is on any of the SUMO roads."""
    # get position
    self.currentPosition = self.get_position(xOffset, yOffset)
    # get pitch angle
    self.angle = self.get_angle()
    # get all the edges in a radius of 5 meters from the vehicle position
    edges = net.getNeighboringEdges(self.currentPosition[0], self.currentPosition[1], maxDistance, False)
    # remove edges starting by ':' (internal edge of SUMO)
    for i in range(len(edges) - 1, -1, -1):
        if (edges[i][0]).getID().startswith(":"):
            edges.pop([i])
    # find the closest edge
    if edges:
        # correct distance using the third dimension
        for i in range(0, len(edges)):
            edge = (edges[i][0]).getID()
            # get height of this edge
            height = 0.0
            tags = edge.split('_')
            del tags[0]  # remove first which is the 'id' of the edge
            for tag in tags:
                if tag.startswith('height'):
                    height = float(tag.split('height', 1)[1])
            newDist = math.sqrt(math.pow(edges[i][1], 2) + math.pow(self.currentPosition[2] - height, 2))
            edges[i] = (edges[i][0], newDist)
        # sort edges by distances to get the closest one
        self.currentDistancesToEdges = sorted([(dist, currentEdge) for currentEdge, dist in edges])
        if self.currentDistancesToEdges[0][0] < maxDistance:
            return True
    return False