pose
KinematicPose
¶
A snapshot of joint angles defining a static fly pose.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
PathLike | None
|
Path to YAML file containing joint angles and metadata. Either this or
|
None
|
joint_angles_rad_dict
|
dict[str, float] | None
|
Dictionary mapping joint DoF names to angles in radians. Either this or
|
None
|
axis_order
|
AxisOrder | str | list[RotationAxis | str] | None
|
The AxisOrder of the provided angles if initializing from
|
None
|
mirror_left2right
|
bool
|
If True, mirror left-side joint angles to right-side when not provided. |
True
|
Example:
pose = KinematicPose(path="neutral.yaml", mirror_left2right=True)
# then use `pose.joint_angles_lookup_rad`
Source code in src/flygym/compose/pose.py
KinematicPosePreset
¶
Bases: Enum
Presets for commonly used fly poses.
Attributes:
| Name | Type | Description |
|---|---|---|
NEUTRAL |
The neutral (resting) pose of the fly. |
Source code in src/flygym/compose/pose.py
get_pose_by_axis_order(axis_order, mirror_left2right=True)
¶
Load the preset pose for a given axis order.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
axis_order
|
AxisOrder
|
The axis order to use. |
required |
mirror_left2right
|
bool
|
If True, mirror left-side angles to the right side. |
True
|
Returns:
| Type | Description |
|---|---|
KinematicPose
|
The loaded |