Skip to content

Commit 898e6c0

Browse files
committed
Merge remote-tracking branch 'origin/summoning_planning_with_parking' into summoning_integration
2 parents c7d47bf + e43f3ee commit 898e6c0

4 files changed

Lines changed: 12 additions & 10 deletions

File tree

GEMstack/knowledge/routes/summoning_roadgraph_highbay.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

GEMstack/onboard/planning/route_planning_component.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ def __init__(self, roadgraphfn : str = None, map_type : str = 'roadgraph', map_f
179179
self.parking_route_existed = False
180180

181181
# Used as route searchers' time limit as well as the update rate of the component
182-
self.update_rate = 0.25
182+
self.update_rate = 0.5
183183

184184
def state_inputs(self):
185185
return ["all"]

roadgraph_generator.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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

193193
if __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),

roadgraph_lane_reader.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ def get_lane_points_from_roadgraph(roadgraph: Roadgraph) -> List:
2626

2727
roadgraphfn = "GEMstack/knowledge/routes/summoning_roadgraph_sim.json"
2828
map_frame = 'start'
29+
# roadgraphfn = "GEMstack/knowledge/routes/summoning_roadgraph_highbay.json"
30+
# map_frame = 'global'
2931
base, ext = os.path.splitext(roadgraphfn)
3032
if ext in ['.json', '.yml', '.yaml']:
3133
with open(roadgraphfn, 'r') as f:
@@ -43,11 +45,11 @@ def get_lane_points_from_roadgraph(roadgraph: Roadgraph) -> List:
4345
elif map_type == 'pointlist':
4446
lane_points = roadgraph.points
4547

46-
np.savetxt('roadgraph_lane_points.txt', lane_points, delimiter=',')
48+
# np.savetxt('roadgraph_lane_points.txt', lane_points, delimiter=',')
4749

4850
lane_points = np.array(lane_points)
49-
x = lane_points[:, 0]
50-
y = lane_points[:, 1]
51+
x = lane_points[:, 0] #*100
52+
y = lane_points[:, 1] #*100
5153
plt.scatter(x,y)
5254
plt.axis('equal')
5355
plt.show()

0 commit comments

Comments
 (0)