Hello and welcome to the video tutorials of NeuroMechFly.
NeuroMechFly is a neuromechanical simulation of the fruit fly Drosophila melanogaster.
It is developed here at the Neuroengineering Laboratory at EPFL, the Swiss Federal Institute
of Technology in Lausanne.
In this first tutorial, we'll briefly go through the body model of NeuroMechFly.
You can start by visiting the NeuroMechFly website at neuromechfly.org.
On the front page, you'll see a summary of the features and capabilities of our model,
as well as an interactive viewer of NeuroMechFly.
Let's view this in full screen.
As indicated at the bottom left corner, you can drag an interactive viewer to orbit,
scroll to zoom, and right drag to pan,
and while pressing shift, you can drag different body segments to apply external perturbations.
You can reset the physics simulation here, and reset the camera here.
Lower down, in the position actuator section, you'll find sliders that control the joint
angles on the six legs.
For example, looking at the left front leg, we can move the sliders to change the joint angles.
The positions of the sliders indicate the desired joint angles, in this case, specified
by the user in the web interface.
In simulations, typically, it is the target joint angles desired by the controller.
And the green triangles indicate the current actual angles of the joints.
You'll notice that the green triangle and the slider don't always overlap,
and that is because the position actuators have a finite gain.
That is, position actuators apply a finite amount of force to make the joint angles consistent
with what the user desires.
The more drastic the pose of the fly is, the greater the distance between the target position
and the actual position.
Higher up, in the physics parameters section, you'll see, in this case, three important
physics parameters that you can tune.
We'll start with actuator gain.
This is the ability or the amount of force that the simulation applies to make the
green arrow follow the slider.
The greater the actuator gain, the closer the green triangle is to the slider.
Let's reset the simulation.
It's important to note that
the NeuroMechFly model in this demo has many joints indicated here,
but not every joint is actively actuated.
Here the pink markers indicate the active joints, where there is an actuator that actually
applies a force, whereas the yellow ones are only subjected to passive dynamics, such as
joint stiffness and joint damping.
If we reduce the joint stiffness, we'll observe that the passive joints become basically entirely
soft in that, not soft in that they deform, but soft in the sense that they
become more subjected to gravity,
whereas you increase the stiffness the closer they are to the preset neutral angles.
If you shift drag a body segment to apply a perturbation force, the fly will eventually
recover to the neutral position.
In fact, we can visualize this by looking at the contact points and contact forces.
As we push this leg downward, you can see more contact points between this leg and the ground,
and if we enable contact forces, we'll see that these forces are also being visualized.
Let's reset the physics.
The timescale of this restoration to the neutral pose is determined or impacted by
the joint damping parameter.
If we increase the damping, then this process becomes slower,
whereas if we decrease damping, if we set it to literally zero, I suspect the physics
simulation is simply going to crash,
so let's keep it at 0.01,
then this process becomes very fast.
It's important to set sensible values to this physics parameter.
Unfortunately, it's not always possible to experimentally calibrate every single one
of them,
but we have to somehow make an educated guess,
and if we choose very obviously wrong parameters such as a combination of very
high stiffness and very low damping, then we get this kind of behavior. Let me
reset the simulation.
This kind of fast oscillation is just not very realistic at all.
So maybe the lesson learned here is that NeuroMechFly is a physics simulation.
It is not an animation.
The fly in simulation is subjected to the laws of physics,
not everything is possible,
and it's important to tune the physics parameters correctly.