unit6_pp/scripts/planner_solution.py
def _get_min_point(self, seg, lot):
        """ Chooses between the orthogonal projection, and the start and end points
            of the segment.

        If the given orthogonal projection lies out of the segment, the whether the start
        or end point of the segment must be chosen as the minimum point.

        :param seg: The segment.
        :type seg: geographic_msgs/RouteSegment
        :param lot: The perpendicular point to the segment.
        :type lot: geodesy.utm.UTMPoint

        :return: The perpendicular point if it is on the segment, else the start or end
                 point of the segment.
        :rtype: geodesy.utm.UTMPoint
        """
        utm_seg_start = self.utm_points[self.points.index(seg.start.uuid)]
        utm_seg_end = self.utm_points[self.points.index(seg.end.uuid)]
        length_seg = self.distance2D(utm_seg_start, utm_seg_end)
        length_lot2start = self.distance2D(lot, utm_seg_start)
        length_lot2end = self.distance2D(lot, utm_seg_end)
        if (length_lot2start <= length_seg and length_lot2end <= length_seg):
            return lot
        elif length_lot2start < length_lot2end:
            return utm_seg_start
        else:
            return utm_seg_end
 Chooses between the orthogonal projection, and the start and end points
            of the segment.

        If the given orthogonal projection lies out of the segment, the whether the start
        or end point of the segment must be chosen as the minimum point.

        :param seg: The segment.
        :type seg: geographic_msgs/RouteSegment
        :param lot: The perpendicular point to the segment.
        :type lot: geodesy.utm.UTMPoint

        :return: The perpendicular point if it is on the segment, else the start or end
                 point of the segment.
        :rtype: geodesy.utm.UTMPoint
        
Chooses between the orthogonal projection, and the start and end points
of the segment.

If the given orthogonal projection lies out of the segment, the whether the start
or end point of the segment must be chosen as the minimum point.
Chooses between the orthogonal projection and the start and end points of the segment . If the given orthogonal projection lies out of the segment the whether the start or end point of the segment must be chosen as the minimum point .
def _get_min_point(self, seg, lot):
        utm_seg_start = self.utm_points[self.points.index(seg.start.uuid)]
        utm_seg_end = self.utm_points[self.points.index(seg.end.uuid)]
        length_seg = self.distance2D(utm_seg_start, utm_seg_end)
        length_lot2start = self.distance2D(lot, utm_seg_start)
        length_lot2end = self.distance2D(lot, utm_seg_end)
        if (length_lot2start <= length_seg and length_lot2end <= length_seg):
            return lot
        elif length_lot2start < length_lot2end:
            return utm_seg_start
        else:
            return utm_seg_end
def _get_min_point ( self , seg , lot ) : utm_seg_start = self . utm_points [ self . points . index ( seg . start . uuid ) ] utm_seg_end = self . utm_points [ self . points . index ( seg . end . uuid ) ] length_seg = self . distance2D ( utm_seg_start , utm_seg_end ) length_lot2start = self . distance2D ( lot , utm_seg_start ) length_lot2end = self . distance2D ( lot , utm_seg_end ) if ( length_lot2start <= length_seg and length_lot2end <= length_seg ) : return lot elif length_lot2start < length_lot2end : return utm_seg_start else : return utm_seg_end
Chooses between the orthogonal projection, and the start and end points
of the segment.
Chooses between the orthogonal projection and the start and end points of the segment .
""" Chooses between the orthogonal projection, and the start and end points
            of the segment.

        If the given orthogonal projection lies out of the segment, the whether the start
        or end point of the segment must be chosen as the minimum point.

        :param seg: The segment.
        :type seg: geographic_msgs/RouteSegment
        :param lot: The perpendicular point to the segment.
        :type lot: geodesy.utm.UTMPoint

        :return: The perpendicular point if it is on the segment, else the start or end
                 point of the segment.
        :rtype: geodesy.utm.UTMPoint
        """
The perpendicular point if it is on the segment, else the start or end
point of the segment.
The perpendicular point if it is on the segment else the start or end point of the segment .
geodesy.utm.UTMPoint
self
seg
None
lot
The perpendicular point to the segment.
The perpendicular point to the segment .