From c36340d29a345d2ded6df88e98eb2666143ca0cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=BCng?= Date: Fri, 14 Aug 2020 09:56:49 +0200 Subject: [PATCH] ActuatorEffectivenessMultirotor: set effectiveness to zero when computing the matrix Just to be on the safe side. --- .../ActuatorEffectiveness/ActuatorEffectivenessMultirotor.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessMultirotor.cpp b/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessMultirotor.cpp index e2e7d2e883..11cab60aa0 100644 --- a/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessMultirotor.cpp +++ b/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessMultirotor.cpp @@ -145,6 +145,8 @@ ActuatorEffectivenessMultirotor::computeEffectivenessMatrix(const MultirotorGeom { int num_actuators = 0; + effectiveness.setZero(); + for (size_t i = 0; i < NUM_ROTORS_MAX; i++) { // Get rotor axis matrix::Vector3f axis(