As far as I understand this function from this tutorial, it sets a force/torque to the joint such that the resulting acceleration results in achieving the specified velocity within one time step, where the force is saturated to "fmax".
Is there a way to return the force being applied to the joint?