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

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 from debris_asset_tag.

position_request

Specifies the location around which traffic should be spawned. Only works with LocationRelativePositionRequest and LaneSpawnPolicy. 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 and debris_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:

DebrisGeneratorParameters

Returns:

An DebrisGeneratorParameters object which specifies the position passed in the position_request parameter