utils.utils#
Utility module.
- load_controller(path: Path) Type[Controller]#
Load the controller module from the given path and return the Controller class.
- Parameters:
path – Path to the controller module.
- load_config(path: Path) ConfigDict#
Load the race config file.
- Parameters:
path – Path to the config file.
- Returns:
The configuration.
- draw_line(env: RaceCoreEnv, points: NDArray, rgba: NDArray | None = None, min_size: float = 3.0, max_size: float = 3.0)#
Draw a line into the simulation.
- Parameters:
env – The drone racing environment.
points – An array of [N, 3] points that make up the line.
rgba – The color of the line.
min_size – The minimum line size. We linearly interpolate the size from min_size to max_size.
max_size – The maximum line size.
Note
This function has to be called every time before the env.render() step.