Utilities¶
This page documents the miscellaneous utilities that are included with the FlyGym package.
- flygym.util.get_data_path(package: str, file: str) Path ¶
Given the names of the package and a file (or directory) included as package data, return the absolute path of it in the installed package. This wrapper handles the
pkg_resources
-to-importlib.resources
API change in Python.
- flygym.util.load_config() dict[str, Any] ¶
Load the YAML configuration file as a dictionary.
- flygym.util.plot_mujoco_rollout(obs_list: list[ObsType], timestep: float, out_dir: Path) None ¶
Plot the fly position and joint angle time series of a simulation and save the image to file. This function is used for debugging.