@@ -569,23 +569,23 @@ def traffic_light_conversion(self, traffic_light_way: Way, new_lanelet_ids: Dict
569569 # now go through the lanelets and find the relation, which would match the traffic light and the lanelet
570570 wr_lanelets = set ()
571571 for wr in self .osm .way_relations :
572- for re in self .osm .way_relations [wr ].regulatory_elements :
573- if re in traffic_light_relations :
572+ for reg_elem in self .osm .way_relations [wr ].regulatory_elements :
573+ if reg_elem in traffic_light_relations :
574574 # found the wr, now need to match it with corresponding lanelet
575575 # for that the "new_lanelet_ids" dict is used that is sent to this function
576576 wr_lanelets .add (new_lanelet_ids [wr ])
577577
578578 if self ._config .autoware :
579579 # for autoware, convert the ref_line of the traffic light
580- regulatory_element = self .osm .find_regulatory_element_by_id (re )
580+ regulatory_element = self .osm .find_regulatory_element_by_id (reg_elem )
581581 for line in regulatory_element .ref_line :
582582 # extract geometrical features
583583 line_way = self .osm .find_way_by_id (line )
584584 line_way_vertices = self ._convert_way_to_vertices (line_way )
585585 start = line_way_vertices [0 ]
586586 end = line_way_vertices [- 1 ]
587587 # create stop line
588- stop_line = StopLine (start = start , end = end , traffic_light_ref = {re },
588+ stop_line = StopLine (start = start , end = end , traffic_light_ref = {reg_elem },
589589 line_marking = LineMarking .SOLID )
590590 # add stop line to the lanelet
591591 lanelet = self .lanelet_network .find_lanelet_by_id (new_lanelet_ids [wr ])
0 commit comments