smarts.core.utils.resources module

class smarts.core.utils.resources.VehicleDefinitions(data: Dict[str, Any], filepath: str | Path)[source]

This defines a set of vehicle definitions and loading utilities.

chassis_params_for_vehicle_class(vehicle_class: str)[source]

Get the controller parameters for the given vehicle type

controller_params_for_vehicle_class(vehicle_class: str)[source]

Get the controller parameters for the given vehicle type

data: Dict[str, Any]

The data associated with the vehicle definitions. This is generally vehicle type keys.

filepath: str | Path

The path to the vehicle definitions file.

load_vehicle_definition(vehicle_class: str)[source]

Loads in a particular vehicle definition.

smarts.core.utils.resources.load_vehicle_definitions_list(vehicle_list_filepath: str | None)[source]

Load a vehicle definition list file.

smarts.core.utils.resources.load_yaml_config(path: Path) Dict[str, Any] | None[source]

Read in a yaml configuration to dictionary format.

smarts.core.utils.resources.load_yaml_config_with_substitution(path: str | Path) Dict[str, Any] | None[source]

Read in a yaml configuration to dictionary format replacing instances of ${{module}} with module’s file path and ${} with the SMARTS environment variable.