suboptimumg.yaml#
- suboptimumg.yaml.load_car_from_yaml(yaml_path)[source]#
Load a vehicle configuration and return a Car or IrlCar instance.
The YAML type is determined by the
typefield:type: base(or omitted) →Cartype: irl_setup→IrlCar
- suboptimumg.yaml.load_competition_from_dicts(car_config, comp_config)[source]#
Create a Competition object from configuration dictionaries.
- Parameters:
car_config (dict) – The vehicle configuration dictionary.
comp_config (dict) – The competition configuration dictionary. Sampled track paths resolve against the current working directory.
- Return type:
- suboptimumg.yaml.load_competition_from_yaml(car_yaml_path, comp_yaml_path)[source]#
Create a Competition object from YAML configuration files.
- Parameters:
car_yaml_path (str) – The file path to the vehicle configuration YAML file.
comp_yaml_path (str) – The file path to the competition configuration YAML file.
- Return type:
- suboptimumg.yaml.save_track_to_yaml(track, yaml_path, source)[source]#
Save a Track as uniformly spaced samples so a competition YAML can reference it.
- Parameters:
track (Track) – Track to save. Its radius, x and y samples are written.
yaml_path (str) – Destination file path.
source (SampledTrackSource) – Bookkeeping about which log and lap the track came from.
- Return type:
None
Notes
Reference the saved file from
parameters/competition.yamlwith:tracks: endurance: path: tracks/<file name>.yaml