This page documents the miscellaneous utilities that are included with the FlyGym package.

flygym.common.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.mujoco.util.load_config() Dict[str, Any]#

Load the YAML configuration file as a dictionary.

flygym.mujoco.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.