paralleldomain.data_lab.generators.spawn_data¶
- class AgentSpawnData(*, proto=None, tags=None)¶
Contains spawn metadata that applies across agent types.
- Parameters:
- tags¶
Tags to be applied to the agent. Tags are case sensitive.
- class DroneSpawnData(*, proto=None, ascend_probability=None, ground_asset_probability=None, ground_assets=None, flight_path_dir=None, agent_spawn_data=None, height_offset=None, ground_asset_height_offset=None)¶
Parameters to control a drone’s spawn characteristics and movement behavior.
- Parameters:
ascend_probability (
Optional
[float
]) –ascend_probability
ground_asset_probability (
Optional
[float
]) –ground_asset_probability
ground_assets (
Optional
[List
[str
]]) –ground_assets
flight_path_dir (
Optional
[str
]) –flight_path_dir
agent_spawn_data (
Optional
[AgentSpawnData
]) –agent_spawn_data
height_offset (
Optional
[ContinousUniformDistribution
]) –height_offset
ground_asset_height_offset (
Optional
[ContinousUniformDistribution
]) –ground_asset_height_offset
proto (Optional[pd_unified_generator_pb2.DroneSpawnData]) –
- ascend_probability¶
Specify the probability that the drone will ascend (as opposed to descend). Specified as a float in the range 0.0 to 1.0. Default: 0.5
- ground_asset_probability¶
Probability of having a ground asset directly below the lowest point of the drone’s flight path. Default: 0.5
- ground_assets¶
List of ground assets to choose from if a ground asset should be spawned based on the parameter
ground_asset_probability
.
- flight_path_dir¶
Directory where flight path csv files are stored within the instance. If not provided, default flight path shape is used.
- agent_spawn_data¶
Specifies spawn data which applies to the agents. If not provided, will default to default values in
AgentSpawnData
.
- height_offset¶
Specifies the vertical distance, in meters, between the lowest point of the drone flight path and the ground. Specified as a
ContinousUniformDistribution
which is randomly sampled from at scenario generation.
- ground_asset_height_offset¶
Specifies the vertical distance above the ground which the ground asset should be spawned at if a ground asset should be spawned according to parameters in
ground_asset_probability
.Specified as a
ContinousUniformDistribution
which is randomly sampled from at scenario generation.
- class PedestrianSpawnData(*, proto=None, pedestrian_color_override_probability=None, pedestrian_color_override_rgb=None, orient_to_velocity=None, check_occupancy=None, jaywalker_ego_fwd_offset=None, agent_spawn_data=None, ped_behavior=None, asset_name=None, speed=None)¶
Parameters to control a pedestrian’s spawn characteristics and movement behavior.
- Parameters:
pedestrian_color_override_probability (
Optional
[CenterSpreadConfig
]) –pedestrian_color_override_probability
pedestrian_color_override_rgb (
Optional
[Float3
]) –pedestrian_color_override_rgb
orient_to_velocity (
Optional
[bool
]) –orient_to_velocity
check_occupancy (
Optional
[bool
]) –check_occupancy
jaywalker_ego_fwd_offset (
Optional
[float
]) –jaywalker_ego_fwd_offset
agent_spawn_data (
Optional
[AgentSpawnData
]) –agent_spawn_data
ped_behavior (
Optional
[PedestrianBehavior
]) –ped_behavior
asset_name (
Optional
[str
]) –asset_name
proto (Optional[pd_unified_generator_pb2.PedestrianSpawnData]) –
- pedestrian_color_override_probability¶
Specifies probability of overriding color of pedestrian’s clothes to RGB color specified by
pedestrian_color_override_rgb
. Probability is specified as a CenterSpreadConfig with values in the range 0.0 to 1.0, and is randomly sampled from during scenario generation. If not provided, will default to 0.0.
- pedestrian_color_override_rgb¶
Specifies color to override pedestrian’s clothes with if a pedestrian will have its clothing color overridden based on
pedestrian_color_override_probability
. Specified as RGB values in the range 0.0 to 1.0.
- orient_to_velocity¶
Boolean flag to specify whether pedestrians always face the direction of travel. Default: True
- check_occupancy¶
Boolean flag to specify whether spawn locations are checked for occupancy by other agents prior to spawning. Default: True
- jaywalker_ego_fwd_offset¶
Specifies how far ahead, in meters, a jaywalking pedestrian should be from the tagged vehicle. If
ped_behavior
does not specify that the pedestrian is a JAYWALKER, this field is ignored. Default: 20.0
- agent_spawn_data¶
Specifies spawn data which applies to the agents. If not provided, will default to default values in
AgentSpawnData
.
- ped_behavior¶
Specifies desired behavior of pedestrian being spawned. If not provided, will default to NORMAL behavior.
- asset_name¶
Asset name of the pedestrian being spawned. Default: char_hannah_001
- speed¶
Specifies the speed in meters per second of the pedestrian being spawned. Default: 1.0
- class VehicleSpawnData(*, proto=None, vehicle_behavior=None, vehicle_peripheral=None, agent_spawn_data=None)¶
Parameters to controls a vehicle’s spawn characteristics and movement behavior.
- Parameters:
vehicle_behavior (
Optional
[VehicleBehavior
]) –vehicle_behavior
vehicle_peripheral (
Optional
[VehiclePeripheral
]) –vehicle_peripheral
agent_spawn_data (
Optional
[AgentSpawnData
]) –agent_spawn_data
proto (Optional[pd_unified_generator_pb2.VehicleSpawnData]) –
- vehicle_behavior¶
Parameters to control the movement behavior of a vehicle. If not provided, will default to default values in
VehicleBehavior
.
- vehicle_peripheral¶
Parameters that control vehicle peripherals (eg. accessories, color, occupants, etc.). If not provided, will default to default values in
VehiclePeripheral
.
- agent_spawn_data¶
Specifies spawn data which applies to the agents. If not provided, will default to default values in
AgentSpawnData
.