Skip to content

Commit 208f449

Browse files
Try drawing lane markings on junctions (fixes roundabout on Town03)
1 parent 11acef8 commit 208f449

File tree

2 files changed

+19
-18
lines changed

2 files changed

+19
-18
lines changed

carla_birdeye_view/mask.py

+18-17
Original file line numberDiff line numberDiff line change
@@ -226,24 +226,25 @@ def road_mask(self) -> Mask:
226226
def lanes_mask(self) -> Mask:
227227
canvas = self.make_empty_mask()
228228
for road_waypoints in self._each_road_waypoints:
229-
if not road_waypoints[0].is_junction:
230-
# Left Side
231-
lanes.draw_lane_marking_single_side(
232-
canvas,
233-
road_waypoints,
234-
side=LaneSide.LEFT,
235-
location_to_pixel_func=self.location_to_pixel,
236-
color=COLOR_ON,
237-
)
229+
# if not road_waypoints[0].is_junction:
230+
# NOTE This block was inside if statement - some junctions may not have proper lane markings drawn
231+
# Left Side
232+
lanes.draw_lane_marking_single_side(
233+
canvas,
234+
road_waypoints,
235+
side=LaneSide.LEFT,
236+
location_to_pixel_func=self.location_to_pixel,
237+
color=COLOR_ON,
238+
)
238239

239-
# Right Side
240-
lanes.draw_lane_marking_single_side(
241-
canvas,
242-
road_waypoints,
243-
side=LaneSide.RIGHT,
244-
location_to_pixel_func=self.location_to_pixel,
245-
color=COLOR_ON,
246-
)
240+
# Right Side
241+
lanes.draw_lane_marking_single_side(
242+
canvas,
243+
road_waypoints,
244+
side=LaneSide.RIGHT,
245+
location_to_pixel_func=self.location_to_pixel,
246+
color=COLOR_ON,
247+
)
247248
return canvas
248249

249250
def agent_vehicle_mask(self, agent: carla.Actor) -> Mask:

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
setup(
99
name="carla-birdeye-view",
10-
version="1.0.14",
10+
version="1.0.21",
1111
description="Bird-eye's view for CARLA simulator",
1212
keywords=["CARLA", "birdview", "bird-eye's view", "Reinforcement Learning", "RL"],
1313
long_description=README,

0 commit comments

Comments
 (0)