State

The State represents the state of the animal. This can include the biomechanical state (ie. pose, or a collection of joint angles), the neural state (ie. the state of a neural network), or both. Its API is specified by the BaseState class, which can be extended by the user as needed.

This page provides the API reference for the BaseState and the KinematicPose, which is used to define the initial pose (angles at all DoFs) of the simulated fly.

class flygym.mujoco.state.BaseState

Bases: ABC

Base class for animal state (eg. pose) representations. Behaves like a dictionary.

class flygym.mujoco.state.KinematicPose(joint_pos: Dict[str, float])

Bases: BaseState

classmethod from_yaml(pose_file: Path) None

Load pose from YAML file.

Parameters:
pose_filePath

Path to the YAML file containing joint angles.