Skip to content

Commit

Permalink
[rotor_actuator] bug-fix: torque scalar should be proportionally to f…
Browse files Browse the repository at this point in the history
…iltered control signal value, not input value
  • Loading branch information
madratman committed Apr 14, 2020
1 parent 7fedd26 commit 461bc00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion AirLib/include/vehicles/multirotor/RotorActuator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class RotorActuator : public PhysicsBodyVertex {
//see relationship of rotation speed with thrust: http://physics.stackexchange.com/a/32013/14061
output.speed = sqrt(output.control_signal_filtered * params.max_speed_square);
output.thrust = output.control_signal_filtered * params.max_thrust;
output.torque_scaler = output.control_signal_input * params.max_torque * static_cast<int>(turning_direction);
output.torque_scaler = output.control_signal_filtered * params.max_torque * static_cast<int>(turning_direction);
output.turning_direction = turning_direction;
}

Expand Down

0 comments on commit 461bc00

Please sign in to comment.