paralleldomain.data_lab.generators.debris¶
- class DebrisGeneratorParameters(*, proto=None, spawn_probability=None, debris_center_bias=None, min_debris_distance=None, max_debris_distance=None, debris_asset_tag=None, debris_asset_remove_tag=None, position_request=None, asset_distribution=None, agent_spawn_data=None)¶
Generator to place debris in the scenario. Requires previous use of
EgoAgentGeneratorParameters
in the scenario.- Parameters:
spawn_probability (
Optional
[float
]) –spawn_probability
debris_center_bias (
Optional
[float
]) –debris_center_bias
min_debris_distance (
Optional
[float
]) –min_debris_distance
max_debris_distance (
Optional
[float
]) –max_debris_distance
debris_asset_tag (
Optional
[str
]) –debris_asset_tag
debris_asset_remove_tag (
Optional
[str
]) –debris_asset_remove_tag
position_request (
Optional
[PositionRequest
]) –position_request
asset_distribution (
Optional
[Dict
[str
,float
]]) –asset_distribution
agent_spawn_data (
Optional
[AgentSpawnData
]) –agent_spawn_data
proto (Optional[pd_unified_generator_pb2.DebrisGeneratorParameters]) –
- spawn_probability¶
Specifies the density of debris that is spawned by controlling the proportion of valid spawn points in which debris are spawned. Valid values are floats in the range 0.0 to 1.0. 0.0 indicates no debris spawned. 1.0 indicates maximum possible density. Default: 0.01
- debris_center_bias¶
Determines the lateral bias of debris placement within lanes. Valid values are in the range -1.0 to 1.0. A value of 1.0 will bias debris placement to the center of the lane. A value of -1.0 will bias debris placement to the edges of the lane. A value of 0.0 will evenly place debris throughout the lane.
If not provided, a value of 0.0 will be used
- min_debris_distance¶
Specifies the minimum distance from the ego that debris is spawned. Must be a float greater than 0.0. If not provided, will use value of 0.0.
- max_debris_distance¶
Specifies the maximum distance from the ego that debris is spawned. Must be a float greater than 0.0. Default: 50.0
- debris_asset_tag¶
Comma separated string which lists the assets to be spawn as debris. Every asset has an equal spawn probability. Default: trash_bottle_tall_01
- debris_asset_remove_tag¶
Comma separated string which lists debris assets that appear in
debris_asset_tag
which should be skipped and not spawned. If not provided, no assets are removed fromdebris_asset_tag
.
- position_request¶
Specifies the location around which traffic should be spawned. Only works with
LocationRelativePositionRequest
andLaneSpawnPolicy
. Must be provided.
- asset_distribution¶
Specifies the asset names that should be spawned as debris together with their associated spawn probability. If provided, asset names in
debris_asset_tag
anddebris_asset_remove_tag
are ignored.
- agent_spawn_data¶
Specifies spawn data which applies to the agents spawned by this generator. If not provided, will default to default values in
AgentSpawnData
.
- classmethod from_position_request(position_request, **kwargs)¶
Initializes a DebrisGeneratorParameters object from a pre-defined position request
- Parameters:
position_request (
Union
[AbsolutePositionRequest
,PathTimeRelativePositionRequest
,LocationRelativePositionRequest
,LaneSpawnPolicy
]) – The position request from which the DebrisGeneratorParameters object should be initialized and which the created object will contain- Return type:
- Returns:
An DebrisGeneratorParameters object which specifies the position passed in the position_request parameter