提交 c4f82677 编写于 作者: J jmtao 提交者: Jiaming Tao

tools: mapshow to display YIELD sign

上级 7df9411d
......@@ -262,6 +262,13 @@ class Map:
for curve in stop_line.segment:
self._draw_stop_line(curve.line_segment, stop_sign.id.id, ax, "yellow")
def draw_yield_signs(self, ax):
"""draw_yield_signs"""
for yieldsign in getattr(self.map_pb, "yield"):
for stop_line in yieldsign.stop_line:
for curve in stop_line.segment:
self._draw_stop_line(curve.line_segment, yieldsign.id.id, ax, "powderblue")
@staticmethod
def _draw_stop_line(line_segment, label, ax, label_color_val):
"""draw a signal"""
......
......@@ -35,6 +35,8 @@ def draw(map):
map.draw_pnc_junctions(plt)
if args.showcrosswalks:
map.draw_crosswalks(plt)
if args.showyieldsigns:
map.draw_yield_signs(plt)
if __name__ == "__main__":
......@@ -63,6 +65,9 @@ if __name__ == "__main__":
parser.add_argument(
"-stopsign", "--showstopsigns", action="store_const", const=True,
help="Show all stop sign stop lines with ids in map")
parser.add_argument(
"-yieldsign", "--showyieldsigns", action="store_const", const=True,
help="Show all yield sign stop lines with ids in map")
parser.add_argument(
"-junction", "--showjunctions", action="store_const", const=True,
help="Show all pnc-junctions with ids in map")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册