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 type field:

  • type: base (or omitted) → Car

  • type: irl_setup → IrlCar

Parameters:

yaml_path (str) – Path to the YAML configuration file.

Return type:

Car or 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:

Competition

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:

Competition

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.yaml with:

tracks:
  endurance:
    path: tracks/<file name>.yaml