paralleldomain.data_lab.behaviors.traffic_sign

class TrafficSignAttachToPoleBehavior(random_seed, parent_pole_id, all_signs_on_pole_metadata, sign_spacing, max_random_yaw)
Behavior that spawns traffic sign poles to which traffic signs can be attached. This behavior works by defining

a region in which traffic sign poles can be placed, and randomly selecting points within that region to spawn traffic sign poles

Parameters:
  • random_seed (int) – The integer to seed all random functions with, allowing scenario generation to be deterministic

  • parent_pole_id (int) – The agent ID of the traffic sign pole to which this traffic sign should be attached

  • all_signs_on_pole_metadata (List[Dict]) – A list of dictionaries containing the metadata of all signs which are attached to the traffic sign pole defined by the parent_pole_id. The dict should contain the fields “sign_name” and “height” which contain the asset name of each sign and the height (in meters) of each sign respectively. The information in this list of dictionaries is used to determine the vertical location on the traffic sign pole at which each sign should be spawned

  • sign_spacing (float) – The vertical distance (in meters) which should separate each sign on the traffic sign pole

  • max_random_yaw (float) – The maximum amount (in degrees) that the sign orientation (yaw) should be randomized around the forward direction.

class TrafficSignPoleBehavior(random_seed, radius, single_frame_mode, orient_signs_facing_travel_direction, forward_offset_to_place_signs=15, min_distance_between_signs=2.5, max_retries=100)
Behavior that spawns traffic sign poles to which traffic signs can be attached. This behavior works by defining

a region in which traffic sign poles can be placed, and randomly selecting points within that region to spawn traffic sign poles

Parameters:
  • random_seed (int) – The integer to seed all random functions with, allowing scenario generation to be deterministic

  • radius (float) – The radius of the region in which traffic signs should be spawned

  • single_frame_mode (bool) – Flag to indicate whether this generator is being used to configure a single frame dataset. In single frame datasets, the location of the vehicles and the signage changes between each rendered frame

  • forward_offset_to_place_signs (float) – The distance (in meters) in front of the ego vehicle on which the region in which traffic signs can be spawned should be centered

  • min_distance_between_signs (float) – The minimum distance (in meters) between traffic poles in the scenario

  • max_retries (int) – The maximum number of times the behavior will attempt to find a valid spawn location for the traffic sign pole

  • orient_signs_facing_travel_direction (bool) –

Raises:

PdError – If a valid spawn location cannot be found within the specified max_retries