# Physics integration from acceleration to velocity doesn't match

Hi,

I have a SDF defining a AUV. It has several links, with joints of revolute and with 0 limits connecting them. So I can consider my robot one of rigid body. I also set the inertia of the main link with an known value and the others with a near zero mass and inertia. I also have my own dynamic model integrator, where I set the same model as my robot, with the same damping and buoyancy and apply the same efforts (in my case going forward).

Differently of what I expected, both simulations doesn't match. The forces and accelerations are the same (checked on the main link), but the velocities are not even close (I checked all in body frame). To get the velocity on my dynamic model, I integrate the acceleration. But looks like gazebo gets the velocity some other way, which doesn't match the expected.

Anyone knows how gazebo compute the velocities? Does it make the model behavior differently of an acceleration integrator? Is there any embedded damping on gazebo to force the model be stable?

To better explain, here is a graph

I apply a force in a link and plot the resulting force using `model->GetLink("my_link")->GetRelativeForce()`

and the acceleration with `model->GetLink("my_link")->GetRelativeLinearAccel()`

. The mass of the link is 350 kg, and for a 90N force gives a acceleration of ~0.25 m/s².

But for the velocity, displayed at the last graph with `model->GetLink("my_link")->GetRelativeLinearVel()`

, the rate of increase is not what I expected (~2.5 m/s /10s). Gazebo provides a much slower velocity.

Gazebo indeed computes acceleration by dividing the force by the mass. But how it computes the velocity? Should not the acceleration being the derivative of the velocity?