Skip to content

Commit

Permalink
bug-fix l2 missing traffic light nodes if no successor
Browse files Browse the repository at this point in the history
  • Loading branch information
smaierhofer committed Oct 14, 2024
1 parent be11ae1 commit b6d78ed
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crdesigner/map_conversion/lanelet2/cr2lanelet.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,8 @@ def _add_regulatory_element_for_traffic_lights(self):
# map the end of the lanelet to the ref_line
# maybe map the stop line also? Lanelets from examples didn't have stopLines so double check if needed
x, y = self._get_shared_last_nodes_from_other_lanelets(ll)
if x is None or y is None:
x, y = self.last_nodes.get(ll.lanelet_id, (None, None))
way_tl = Way(self.id_count, [x, y])
self.osm.add_way(way_tl)
way_list = [way_tl.id_]
Expand Down

0 comments on commit b6d78ed

Please sign in to comment.