simulation.src.simulation_groundtruth.src.groundtruth.test.mock_node module

Summary

Classes:

GroundtruthMockNode

Subclass of GroundtruthNode which loads mock road sections for testing.

Functions:

create_intersection

Mock intersection to be used for testing.

create_parking_section

Mock parking section to be used for testing.

create_straight_section

Mock straight section to be used for testing.

Reference

create_straight_section(id: int, obstacle: bool = False)[source]

Mock straight section to be used for testing.

Parameters
  • id – ID of the section.

  • obstacle – Indicate whether there should be an obstacle on the right lane.

  • lane_width – width of right and left lane.

create_parking_section(id: int, left: bool = True, right: bool = True, lane_width=0.4)[source]

Mock parking section to be used for testing.

Parameters
  • id – ID of the section.

  • left – Indicate whether a parking lot on the left side should be created.

  • right – Indicate whether a parking lot on the right side should be created.

  • lane_width – width of right and left lane.

create_intersection(id: int, rule: int = 0, lane_width: float = 0.4)[source]

Mock intersection to be used for testing.

Parameters
  • id – ID of the section.

  • rule – Priority rule of intersection.

  • lane_width – width of right and left lane.

class GroundtruthMockNode(name='groundtruth_node', log_level=2)[source]

Bases: simulation.src.simulation_groundtruth.src.groundtruth.node.GroundtruthNode

Subclass of GroundtruthNode which loads mock road sections for testing.

The parameter road can be used to specify which road should be created. All options are explained in the parameter file.

_load_road()[source]

Load road sections from current road.