Skip to content

Commit

Permalink
Try drawing lane markings on junctions (fixes roundabout on Town03)
Browse files Browse the repository at this point in the history
  • Loading branch information
micmarty-deepsense committed May 7, 2020
1 parent 11acef8 commit 208f449
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 18 deletions.
35 changes: 18 additions & 17 deletions carla_birdeye_view/mask.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,24 +226,25 @@ def road_mask(self) -> Mask:
def lanes_mask(self) -> Mask:
canvas = self.make_empty_mask()
for road_waypoints in self._each_road_waypoints:
if not road_waypoints[0].is_junction:
# Left Side
lanes.draw_lane_marking_single_side(
canvas,
road_waypoints,
side=LaneSide.LEFT,
location_to_pixel_func=self.location_to_pixel,
color=COLOR_ON,
)
# if not road_waypoints[0].is_junction:
# NOTE This block was inside if statement - some junctions may not have proper lane markings drawn
# Left Side
lanes.draw_lane_marking_single_side(
canvas,
road_waypoints,
side=LaneSide.LEFT,
location_to_pixel_func=self.location_to_pixel,
color=COLOR_ON,
)

# Right Side
lanes.draw_lane_marking_single_side(
canvas,
road_waypoints,
side=LaneSide.RIGHT,
location_to_pixel_func=self.location_to_pixel,
color=COLOR_ON,
)
# Right Side
lanes.draw_lane_marking_single_side(
canvas,
road_waypoints,
side=LaneSide.RIGHT,
location_to_pixel_func=self.location_to_pixel,
color=COLOR_ON,
)
return canvas

def agent_vehicle_mask(self, agent: carla.Actor) -> Mask:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

setup(
name="carla-birdeye-view",
version="1.0.14",
version="1.0.21",
description="Bird-eye's view for CARLA simulator",
keywords=["CARLA", "birdview", "bird-eye's view", "Reinforcement Learning", "RL"],
long_description=README,
Expand Down

0 comments on commit 208f449

Please sign in to comment.