uzh-rpg/flightmare

motorThrustToOmega method didn't consider air inflow

rkqd opened this issue · 0 comments

rkqd commented

Reading the motorThrustToOmega implementation, I found the simulation didn't consider air inflow speed, which has a very big impact on the motor/prop rpm to thrust mapping. I understand that the motorOmegaToThrust method also didn't consider air inflow speed. But would air inflow speed help improve the accuracy of the simulation?

[1]:

Vector<4> QuadrotorDynamics::motorThrustToOmega(
  const Vector<4>& thrusts) const {
  const Scalar scale = 1.0 / (2.0 * thrust_map_[0]);
  const Scalar offset = -thrust_map_[1] * scale;

  const Array<4, 1> root =
    (std::pow(thrust_map_[1], 2) -
     4.0 * thrust_map_[0] * (thrust_map_[2] - thrusts.array()))
      .sqrt();

  return offset + scale * root;
}