@@ -111,8 +111,8 @@ def create_straight_lane(left_back : Tuple[float,float,float], left_forward : Tu
111111 lane .right = RoadgraphCurve (type = RoadgraphCurveEnum .LANE_BOUNDARY , segments = right_boundary_points )
112112
113113 if begin_left is not None and begin_right is not None :
114- begin_boundary_points = segment_straight_line (begin_left , begin_right , resolution = resolution )
115- lane .begin = RoadgraphCurve (type = RoadgraphCurveEnum .LANE_BOUNDARY , segments = begin_boundary_points )
114+ begin_boundary_points = segment_straight_line (begin_left , begin_right , resolution = resolution , crossable = crossable )
115+ lane .begin = RoadgraphCurve (type = RoadgraphCurveEnum .LANE_BOUNDARY , segments = begin_boundary_points , crossable = crossable )
116116 if end_right is not None and end_left is not None :
117117 end_boundary_points = segment_straight_line (end_right , end_left , resolution = resolution )
118118 lane .end = RoadgraphCurve (type = RoadgraphCurveEnum .LANE_BOUNDARY , segments = end_boundary_points )
@@ -133,8 +133,8 @@ def create_arc_lane(left_back : Tuple[float,float,float], left_forward : Tuple[f
133133 lane = RoadgraphLane ()
134134 left_boundary_points = segment_arc (left_back , left_forward , left_radius , direction , resolution = resolution )
135135 right_boundary_points = segment_arc (right_back , right_forward , right_radius , direction , resolution = resolution )
136- lane .left = RoadgraphCurve (type = RoadgraphCurveEnum .LANE_BOUNDARY , segments = left_boundary_points )
137- lane .right = RoadgraphCurve (type = RoadgraphCurveEnum .LANE_BOUNDARY , segments = right_boundary_points )
136+ lane .left = RoadgraphCurve (type = RoadgraphCurveEnum .LANE_BOUNDARY , segments = left_boundary_points , crossable = crossable )
137+ lane .right = RoadgraphCurve (type = RoadgraphCurveEnum .LANE_BOUNDARY , segments = right_boundary_points , crossable = crossable )
138138
139139 if begin_left is not None and begin_right is not None :
140140 begin_boundary_points = segment_straight_line (begin_left , begin_right , resolution = resolution )
@@ -192,7 +192,6 @@ def create_lane(left_back : Tuple, left_forward : Tuple,
192192
193193if __name__ == '__main__' :
194194 resolution = 0.4
195-
196195 filename = 'GEMstack/knowledge/routes/summoning_roadgraph_sim.json'
197196 frame = ObjectFrameEnum .START
198197 roadgraph = Roadgraph (frame = frame )
@@ -306,6 +305,7 @@ def create_lane(left_back : Tuple, left_forward : Tuple,
306305
307306 lon_ratio = (- 88.235527 + 88.236129 ) / 51.34 # lon / m
308307 lat_ratio = (40.092819 - 40.092741 ) / 8.66 # lat / m
308+ resolution = 0.4 * min (lon_ratio , lat_ratio )
309309
310310 # Create lane segments
311311 roadgraph .lanes ['highbay_outer_lane' ] = create_straight_lane (left_back = (- 88.236129 , 40.092741 + lat_ratio * 1.5 , 0.0 ), left_forward = (- 88.235527 , 40.092741 + lat_ratio * 1.5 , 0.0 ),
0 commit comments