simulation.src.simulation_evaluation.src.speaker.speakers.zone module

Class definition of the ZoneSpeaker.

Summary

Classes:

ZoneSpeaker

Information about the zone of the road the car is in.

Reference

class ZoneSpeaker(*, section_proxy: Callable[], List[simulation_groundtruth.msg._Section.Section]], lane_proxy: Callable[[int], simulation_groundtruth.msg._Lane.Lane], obstacle_proxy: Callable[[int], List[simulation_groundtruth.msg._LabeledPolygon.LabeledPolygon]], surface_marking_proxy: Callable[[int], List[simulation_groundtruth.msg._LabeledPolygon.LabeledPolygon]], parking_proxy: Callable[[int], Any], intersection_proxy: Callable[[int], Any], overtaking_buffer: float = 2, start_zone_buffer: float = 1, end_zone_buffer: float = 1.5, yield_distance: Tuple[float, float] = (- 0.6, - 0.2))[source]

Bases: simulation.src.simulation_evaluation.src.speaker.speakers.speaker.Speaker

Information about the zone of the road the car is in.

property overtaking_zones

Intervals in which the car is allowed to overtake along the Speaker.middle_line.

_intersection_yield_zones(rule: int) → List[Tuple[float, float]][source]

Intervals in which the car is supposed to halt/stop (in front of intersections).

Parameters

rule – only intersections with this rule are considered

property stop_zones

Intervals in which the car is supposed to stop (in front of intersections).

property halt_zones

Intervals in which the car is supposed to halt (in front of intersections).

_inside_any_interval(intervals: List[Tuple[float, float]]) → bool[source]

Determine if the car is currently in any of the given intervals.

speak() → List[simulation_evaluation.msg._Speaker.Speaker][source]

List of speaker msgs.

Contents:
  • beginning of road -> Speaker.START_ZONE, end of road -> Speaker.END_ZONE, and in between -> Speaker.DRIVING_ZONE,

  • close to an obstacle -> Speaker.OVERTAKING_ZONE

  • before yield/stop lines -> Speaker.HALT_ZONE/SpeakerMsg.STOP_ZONE,

  • parking area -> Speaker.PARKING_ZONE