pyrobosim.core.yaml_utils.get_location_from_args
- pyrobosim.core.yaml_utils.get_location_from_args(loc_args: str | list[str] | dict[str, Any]) str
Gets a single location name from a set of possible argument types.
This can be:
A single string, which just passes through the same value.
A list of strings, in which case one is randomly selected.
A dictionary containing
choicesand (optional)probabilitiesfields, which selects a location given the specified probabilities.
- Parameters:
loc_args – The location arguments.
- Returns:
The selected location name.