示例#1
0
        #     #sdfFile.addRoadDebug([xData[0], yData[0], 0], road)
        #     if len(xData) == 2:
        #         sdfFile.addRoadPoint([xData[1], yData[1], 0], road)
        #         #sdfFile.addRoadDebug([xData[1], yData[1], 0], road)


        roadLaneSegments.append([lanePoint, lanePoint])
        centerLaneSegments.append([x,y])

    else:

        x, y = catmull_rom(xData, yData, 10)

        centerLaneSegments.append([x, y])

        lanes = LaneBoundaries(x,y)

        # [lanePointsA, lanePointsB]  = lanes.createLanes(6)

        # roadLaneSegments.append([lanePointsA, lanePointsB])

        # xPointsA = []
        # yPointsA = []

        # xPointsB = []
        # yPointsB = []

        # for i in range(len(lanePointsA)/2):
        #     xPointsA.append(lanePointsA[i*2][0])
        #     yPointsA.append(lanePointsA[i*2][1])
        #     #sdfFile.addLeftLaneDebug([lanePointsA[i*2][0], lanePointsA[i*2][1], 0], road)
示例#2
0
        #     #sdfFile.addRoadDebug([xData[0], yData[0], 0], road)
        #     if len(xData) == 2:
        #         sdfFile.addRoadPoint([xData[1], yData[1], 0], road)
        #         #sdfFile.addRoadDebug([xData[1], yData[1], 0], road)


        roadLaneSegments.append([lanePoint, lanePoint])
        centerLaneSegments.append([x,y])

    else:

        x, y = catmull_rom(xData, yData, 10)

        centerLaneSegments.append([x, y])

        lanes = LaneBoundaries(x,y)

        [lanePointsA, lanePointsB]  = lanes.createLanes(6)

        roadLaneSegments.append([lanePointsA, lanePointsB])

        xPointsA = []
        yPointsA = []

        xPointsB = []
        yPointsB = []

        for i in range(len(lanePointsA)/2):
            xPointsA.append(lanePointsA[i*2][0])
            yPointsA.append(lanePointsA[i*2][1])
            #sdfFile.addLeftLaneDebug([lanePointsA[i*2][0], lanePointsA[i*2][1], 0], road)
示例#3
0
        #     #sdfFile.addRoadDebug([xData[0], yData[0], 0], road)
        #     if len(xData) == 2:
        #         sdfFile.addRoadPoint([xData[1], yData[1], 0], road)
        #         #sdfFile.addRoadDebug([xData[1], yData[1], 0], road)


        roadLaneSegments.append([lanePoint, lanePoint])
        centerLaneSegments.append([x,y])

    else:

        x, y = catmull_rom(xData, yData, 10)

        centerLaneSegments.append([x, y])

        lanes = LaneBoundaries(x,y)

        # [lanePointsA, lanePointsB]  = lanes.createLanes(6)

        # roadLaneSegments.append([lanePointsA, lanePointsB])

        # xPointsA = []
        # yPointsA = []

        # xPointsB = []
        # yPointsB = []

        # for i in range(len(lanePointsA)/2):
        #     xPointsA.append(lanePointsA[i*2][0])
        #     yPointsA.append(lanePointsA[i*2][1])
        #     #sdfFile.addLeftLaneDebug([lanePointsA[i*2][0], lanePointsA[i*2][1], 0], road)