paralleldomain.data_lab.behaviors.single_frame

class SingleFramePlaceNearEgoBehavior(random_seed, spawn_radius, lane_type, spawn_in_middle_of_lane=False, align_to_ground_normal=True, max_lateral_offset=None, max_rotation_offset_degrees=None, occupancy_check_agent_types=None, max_retries=100)
Controls the placement of a single vehicle in single frame scenarios. Places the vehicle in a different location

on the map during every rendered frame

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

  • spawn_radius (float) – The radius (in meters) of the valid spawn region in which the agent can be placed around the ego agent

  • lane_type (LaneType) – The lane type on which the agent should be spawned

  • spawn_in_middle_of_lane (bool) – If True, the agent will be spawned in the middle of a randomly chosen lane segment. If False, the agent will be spawned at a random point along the randomly chosen lane segment

  • max_lateral_offset (Optional[float]) – The maximum distance (in meters) that the placed agent will be laterally offset from the center of the randomly chosen lane segment

  • max_rotation_offset_degrees (Optional[float]) – The maximum rotation (in degrees) that the placed agent will be rotated relative to the center line of the randomly chosen lane segment

  • max_retries (int) – The maximum number of times to attempt finding a valid spawn location

  • align_to_ground_normal (bool) –

  • occupancy_check_agent_types (List | None) –

Raises:

PdError – If a valid spawn location is not found within the specified max_retries number of attempts

class SingleFrameVehicleBehavior(lane_type, random_seed)
Controls the placement of a single vehicle in single frame scenarios. Places the vehicle in a different location

on the map during every rendered frame

Parameters:
  • lane_type (LaneType) – The lane type on which the vehicle should be spawned

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