StarlingUAS / FenswoodScenario

Fenswood Farm as a scenario for Starling
1 stars 3 forks source link

Environment Variables for controllable target generation #21

Closed mhl787156 closed 2 years ago

mhl787156 commented 2 years ago

This PR adds a number of environment variables to control target generation explicitly:

Spawning Environment Variable Options

The primary options are given by the following:

Name Default Value Description
SPAWN_TARGET_NUM_TARGETS 2 Number of Yellow Targets being spawned
SPAWN_TARGET_NUM_HOTSPOTS 5 Number of Red Targets being spawned
SPAWN_TARGET_HOTSPOT_RADIUS 3 Radius of Red circular hotspots
SPAWN_TARGET_TARGET_LENGTH 20 Length of yellow target
SPAWN_TARGET_TARGET_WIDTH 5 Width of yellow target
SPAWN_TARGET_RANDOM_SEED None Random seed for random generation, used for deterministic arrangements.
SPAWN_TARGET_FILE_PATH '' File Path to fixed spawn, see example file i 'fenswood/target/default_target.json'

Change Size and Location of Volcano Annulus:

Name Default Value Description
SPAWN_TARGET_ANNULUS_RADIUS 40 Radius of Volcano
SPAWN_TARGET_ANNULUS_LOC_X -195 Location Relative to Spawn/Takeoff Location
SPAWN_TARGET_ANNULUS_LOC_Y -163 Location Relative to Spawn/Takeoff Location
SPAWN_TARGET_ANNULUS_LOC_Z 0.1 Location Relative to Spawn/Takeoff Location
Change Random Spawn Parameters Name Default Value Description
SPAWN_TARGET_GEN_TARGET_LOC_ANGLE_MIN -pi/2 Target location generationg minimum angle
SPAWN_TARGET_GEN_TARGET_LOC_ANGLE_MAX pi/2 Target location generation maximum angle
SPAWN_TARGET_GEN_HOTSPOT_ANGLE_VARIANCE 0.3 Hotspot sampling normal variance for angle variation relative to target centers
SPAWN_TARGET_GEN_HOTSPOT_RADIUS_VARIANCE 0.5 Hotspot sampling normal variance for radial variation relative to target centers
SPAWN_TARGET_GEN_BETWEEN_TARGET_LOC_ANGLE_MIN pi/3 Minimal angle targets
SPAWN_TARGET_GEN_BETWEEN_TARGET_LOC_ANGLE_MAX 4 Maximal distance between hotspots

Note that if minimal angle and maximal distance are set incorrectly, it may cause an indefinite sampling as valid samples cannot be generated.