Animal behavior emerges from an interaction between neural network dynamics, musculoskeletal properties and the physical environment. Accessing and understanding the interplay between these elements requires the development of integrative and morphologically realistic neuromechanical simulations. Here we present NeuroMechFly, a data-driven model of the widely studied organism, Drosophila melanogaster. NeuroMechFly combines four independent computational modules: a physics-based simulation environment, a biomechanical exoskeleton, muscle models and neural network controllers. To enable use cases, we first define the minimum degrees of freedom of the leg from real three-dimensional kinematic measurements during walking and grooming. Then, we show how, by replaying these behaviors in the simulator, one can predict otherwise unmeasured torques and contact forces. Finally, we leverage NeuroMechFly's full neuromechanical capacity to discover neural networks and muscle parameters that drive locomotor gaits optimized for speed and stability. Thus, NeuroMechFly can increase our understanding of how behaviors emerge from interactions between complex neuromechanical systems and their physical surroundings.
© 2022. The Author(s), under exclusive licence to Springer Nature America, Inc.