neuromechfly
Fly
¶
Bases: NeuroMechFly
Deprecated alias for NeuroMechFly. Will be removed in a future release.
Source code in src/flygym/compose/fly/neuromechfly.py
NeuroMechFly
¶
Bases: BaseFly
The NeuroMechFly body model for Drosophila melanogaster.
NeuroMechFly is derived from a micro-CT scan of a real fly. It is the
default body model in FlyGym and supports all locomotion, sensorimotor,
and vision experiments. For an alternative anatomically detailed model
with wing and abdomen degrees of freedom, see FlyBody.
Both NeuroMechFly and FlyBody inherit from BaseFly and expose the
same composition API, so they can be used interchangeably.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Identifier for this fly instance. Defaults to |
'nmf'
|
rigging_config_path
|
PathLike
|
Path to YAML file defining body segment positions, orientations, and masses. |
DEFAULT_RIGGING_CONFIG_PATH
|
mesh_basedir
|
PathLike
|
Directory containing STL mesh files for body segments. |
DEFAULT_MESH_DIR
|
mujoco_globals_path
|
PathLike
|
Path to YAML file with global MuJoCo parameters. |
DEFAULT_MUJOCO_GLOBALS_PATH
|
root_segment
|
BodySegment | str
|
Root body segment for the kinematic tree. |
'c_thorax'
|
mirror_left2right
|
bool
|
If True, mirror left-side meshes for the right side. |
True
|
mesh_type
|
MeshType
|
Mesh resolution to use. |
SIMPLIFIED_MAX2000FACES
|
geom_fitting_option
|
GeomFittingOption
|
How to fit collision geometries. |
UNMODIFIED
|
vision_config_path
|
PathLike
|
Path to YAML file with vision sensor configuration. |
DEFAULT_VISION_CONFIG_PATH
|
Source code in src/flygym/compose/fly/neuromechfly.py
colorize(visuals_config_path=DEFAULT_VISUALS_CONFIG_PATH)
¶
Apply colors and textures to the NeuroMechFly model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
visuals_config_path
|
PathLike
|
Path to the YAML file defining per-segment material and texture assignments. Defaults to the bundled NeuroMechFly visuals. |
DEFAULT_VISUALS_CONFIG_PATH
|