simulation.src.simulation_evaluation.src.speaker.speakers.test package

Submodules

simulation.src.simulation_evaluation.src.speaker.speakers.test.fake_msgs module

Functions:

create_points([start_point, offset_right, …])

Create a line of points and split it up into multiple sections.

section_msgs([section_count, section_types])

section_srv([section_count, section_types])

lane_msgs([lines, id])

Imitate the response of the groundtruth lane service by returning what’s in lines at idx id.

lane_srv([lines])

obstacle_msgs(obstacles, id)

obstacle_srv([obstacles])

empty_labeled_polygon_response(id)

surface_marking_srv()

intersection_msg([south, west, east, north, …])

intersection_srv([south, west, east, north, …])

parking_msgs(right_spots, left_spots, …)

parking_srv(right_spots, left_spots, …)

create_points(start_point=Point(0.0, 0.0, 0.0), offset_right=1, point_dist=1, section_count=10, point_count=100, direction=0, deviation=0.39269908169872414)List[simulation.utils.road.sections.line_tuple.LineTuple][source]

Create a line of points and split it up into multiple sections.

section_msgs(section_count: int = 4, section_types: Optional[List[int]] = None)[source]
section_srv(section_count: int = 4, section_types: Optional[List[int]] = None)[source]
lane_msgs(lines: List[simulation.utils.road.sections.line_tuple.LineTuple] = [], id: int = 0)simulation_groundtruth.srv._LaneSrv.LaneSrvResponse[source]

Imitate the response of the groundtruth lane service by returning what’s in lines at idx id.

lane_srv(lines=None)[source]
obstacle_msgs(obstacles: List[simulation.utils.geometry.polygon.Polygon], id: int)simulation_groundtruth.srv._LabeledPolygonSrv.LabeledPolygonSrvResponse[source]
obstacle_srv(obstacles=None)[source]
empty_labeled_polygon_response(id: int)simulation_groundtruth.srv._LabeledPolygonSrv.LabeledPolygonSrvResponse[source]
surface_marking_srv()[source]
intersection_msg(south: Optional[simulation_groundtruth.msg._Lane.Lane] = None, west: Optional[simulation_groundtruth.msg._Lane.Lane] = None, east: Optional[simulation_groundtruth.msg._Lane.Lane] = None, north: Optional[simulation_groundtruth.msg._Lane.Lane] = None, rule: int = 0, turn: int = 0, id: int = 0)simulation_groundtruth.srv._IntersectionSrv.IntersectionSrvResponse[source]
intersection_srv(south: Optional[simulation_groundtruth.msg._Lane.Lane] = None, west: Optional[simulation_groundtruth.msg._Lane.Lane] = None, east: Optional[simulation_groundtruth.msg._Lane.Lane] = None, north: Optional[simulation_groundtruth.msg._Lane.Lane] = None, rule: int = 0, turn: int = 0)[source]
parking_msgs(right_spots: List[simulation.utils.geometry.polygon.Polygon], left_spots: List[simulation.utils.geometry.polygon.Polygon], right_border: simulation.utils.geometry.line.Line, left_border: simulation.utils.geometry.line.Line, id: int)simulation_groundtruth.srv._ParkingSrv.ParkingSrvResponse[source]
parking_srv(right_spots: List[simulation.utils.geometry.polygon.Polygon], left_spots: List[simulation.utils.geometry.polygon.Polygon], right_border: simulation.utils.geometry.line.Line, left_border: simulation.utils.geometry.line.Line)[source]

simulation.src.simulation_evaluation.src.speaker.speakers.test.test_area_speaker module

Classes:

ModuleTest([methodName])

class ModuleTest(methodName='runTest')[source]

Bases: unittest.case.TestCase

Methods:

setUp()

Hook method for setting up the test fixture before exercising it.

test_speaker_properties()

Test properties and speak function of event speaker.

test_speak_function()

Test speaker msg.

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_speaker_properties()[source]

Test properties and speak function of event speaker.

test_speak_function()[source]

Test speaker msg.

simulation.src.simulation_evaluation.src.speaker.speakers.test.test_event_speaker module

Classes:

ModuleTest([methodName])

class ModuleTest(methodName='runTest')[source]

Bases: unittest.case.TestCase

Methods:

test_event_speaker()

Test properties and speak function of event speaker.

test_event_speaker()[source]

Test properties and speak function of event speaker.

simulation.src.simulation_evaluation.src.speaker.speakers.test.test_speaker module

Classes:

ModuleTest([methodName])

class ModuleTest(methodName='runTest')[source]

Bases: unittest.case.TestCase

Methods:

test_line_functions()

Create a line of points as middle line and check if the following functions/attributes work:

test_listen_func()

Test if car state msg is processed correctly.

test_overlapping_inside_funcs()

Test polygon functions:

test_line_functions()[source]

Create a line of points as middle line and check if the following functions/attributes work:

  • get_road_lines()

  • section_intervals

  • middle_line

  • arc_length

  • current_section

test_listen_func()[source]

Test if car state msg is processed correctly.

  • listen()

test_overlapping_inside_funcs()[source]

Test polygon functions:

  • get_interval_for_polygon()

  • car_is_inside()

  • car_overlaps_with()

  • wheel_count_inside()

simulation.src.simulation_evaluation.src.speaker.speakers.test.test_speed_speaker module

Classes:

ModuleTest([methodName])

class ModuleTest(methodName='runTest')[source]

Bases: unittest.case.TestCase

Methods:

test_speed_speaker()

test_speed_speaker()[source]

simulation.src.simulation_evaluation.src.speaker.speakers.test.test_zone_speaker module

Classes:

ModuleTest([methodName])

class ModuleTest(methodName='runTest')[source]

Bases: unittest.case.TestCase

Methods:

setUp()

Hook method for setting up the test fixture before exercising it.

test_zones()

test_stop_zones()

test_halt_zones()

test_speak_function()

Test the speakers msgs by putting the car somewhere and checking the output.

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_zones()[source]
test_stop_zones()[source]
test_halt_zones()[source]
test_speak_function()[source]

Test the speakers msgs by putting the car somewhere and checking the output.

simulation.src.simulation_evaluation.src.speaker.speakers.test.utils module

Functions:

polygon_list_almost_equal(list1, list2)

assert_msgs_for_pos(speaker, frame, *msg_types)

Ensure that the speaker returns the correct msg when the vehicle is at a given position.

polygon_list_almost_equal(list1: Iterable[simulation.utils.geometry.polygon.Polygon], list2: Iterable[simulation.utils.geometry.polygon.Polygon])[source]
assert_msgs_for_pos(speaker, frame, *msg_types)[source]

Ensure that the speaker returns the correct msg when the vehicle is at a given position.

Module contents