Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Control Allocator: Metric #24199

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

Conversation

Pedro-Roque
Copy link
Member

@Pedro-Roque Pedro-Roque commented Jan 10, 2025

Solved Problem

Adds metric control allocation (ie non-normalized) to make possible model-based control schemes.

Solution

Changelog Entry

For release notes:

Feature: Metric Control Allocation
New parameter: XYZ_Z
Documentation: Need to clarify control allocation page

Test coverage

  • Unit/integration test: available
  • Tested in SITL, will provide logs

Context

Depends on #24196

@Pedro-Roque Pedro-Roque changed the title Pr metric allocator library Control Allocator: Overhaul Jan 10, 2025
Copy link

github-actions bot commented Jan 10, 2025

🔎 FLASH Analysis

px4_fmu-v5x [Total VM Diff: 40 byte (0 %)]
    FILE SIZE        VM SIZE    
--------------  -------------- 
+0.0%     +40  +0.0%     +40    .text
  [NEW] +3.29Ki  [NEW] +3.29Ki    ../../src/lib/allocation/control_allocation/ControlAllocationPseudoInverse.cpp
  [NEW] +2.32Ki  [NEW] +2.32Ki    ../../src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessTiltrotorVTOL.cpp
  [NEW] +2.07Ki  [NEW] +2.07Ki    ../../src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp
  [NEW] +1.98Ki  [NEW] +1.98Ki    ../../src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessRotors.cpp
  [NEW] +1.57Ki  [NEW] +1.57Ki    ../../src/lib/allocation/control_allocation/ControlAllocationSequentialDesaturation.cpp
  [NEW] +1.49Ki  [NEW] +1.49Ki    ../../src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessHelicopterCoaxial.cpp
  [NEW] +1.09Ki  [NEW] +1.09Ki    ../../src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessTilts.cpp
  [NEW] +1.04Ki  [NEW] +1.04Ki    ../../src/lib/allocation/control_allocation/ControlAllocation.cpp
  [NEW] +1.04Ki  [NEW] +1.04Ki    ../../src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessMCTilt.cpp
  [NEW] +1.01Ki  [NEW] +1.01Ki    ../../src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessControlSurfaces.cpp
 -100.0%     +40 -100.0%     +40    [18 Others]
  [DEL] -1.01Ki  [DEL] -1.01Ki    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessControlSurfaces.cpp
  [DEL] -1.04Ki  [DEL] -1.04Ki    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessMCTilt.cpp
  [DEL] -1.04Ki  [DEL] -1.04Ki    ../../src/modules/control_allocator/ControlAllocation/ControlAllocation.cpp
  [DEL] -1.09Ki  [DEL] -1.09Ki    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTilts.cpp
  [DEL] -1.49Ki  [DEL] -1.49Ki    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopterCoaxial.cpp
  [DEL] -1.57Ki  [DEL] -1.57Ki    ../../src/modules/control_allocator/ControlAllocation/ControlAllocationSequentialDesaturation.cpp
  [DEL] -1.98Ki  [DEL] -1.98Ki    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessRotors.cpp
  [DEL] -2.07Ki  [DEL] -2.07Ki    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp
  [DEL] -2.32Ki  [DEL] -2.32Ki    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTiltrotorVTOL.cpp
  [DEL] -3.29Ki  [DEL] -3.29Ki    ../../src/modules/control_allocator/ControlAllocation/ControlAllocationPseudoInverse.cpp
+0.0%     +56  [ = ]       0    .debug_abbrev
  [NEW] +1.82Ki  [ = ]       0    ../../src/lib/allocation/actuator_effectiveness/ActuatorEffectiveness.cpp
  [NEW] +1.84Ki  [ = ]       0    ../../src/lib/allocation/control_allocation/ControlAllocation.cpp
  [NEW] +2.32Ki  [ = ]       0    ../../src/lib/allocation/control_allocation/ControlAllocationPseudoInverse.cpp
  [NEW] +2.47Ki  [ = ]       0    ../../src/lib/allocation/control_allocation/ControlAllocationSequentialDesaturation.cpp
   +11%     +56  [ = ]       0    ../../src/lib/version/version.c
  [DEL] -1.82Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectiveness.cpp
  [DEL] -2.56Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessControlSurfaces.cpp
  [DEL] -2.54Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessCustom.cpp
  [DEL] -2.55Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessFixedWing.cpp
  [DEL] -2.85Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp
  [DEL] -2.77Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopterCoaxial.cpp
  [DEL] -2.59Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessMCTilt.cpp
  [DEL] -2.47Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessMultirotor.cpp
  [DEL] -3.15Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessRotors.cpp
  [DEL] -1.84Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessRoverAckermann.cpp
  [DEL] -2.48Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessStandardVTOL.cpp
  [DEL] -2.52Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTailsitterVTOL.cpp
  [DEL] -2.72Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTiltrotorVTOL.cpp
  [DEL] -2.75Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTilts.cpp
  [DEL] -2.48Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessUUV.cpp
  +347% +29.7Ki  [ = ]       0    [17 Others]
-0.0%      -8  [ = ]       0    .debug_aranges
  [NEW]    +128  [ = ]       0    ../../src/lib/allocation/actuator_effectiveness/ActuatorEffectiveness.cpp
  [NEW]     +80  [ = ]       0    ../../src/lib/allocation/control_allocation/ControlAllocation.cpp
  [NEW]    +120  [ = ]       0    ../../src/lib/allocation/control_allocation/ControlAllocationPseudoInverse.cpp
  [NEW]    +144  [ = ]       0    ../../src/lib/allocation/control_allocation/ControlAllocationSequentialDesaturation.cpp
  -5.0%      -8  [ = ]       0    ../../src/lib/version/version.c
  [DEL]    -128  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectiveness.cpp
  [DEL]    -192  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessControlSurfaces.cpp
  [DEL]    -176  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessCustom.cpp
  [DEL]    -184  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessFixedWing.cpp
  [DEL]    -224  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp
  [DEL]    -208  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopterCoaxial.cpp
  [DEL]    -184  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessMCTilt.cpp
  [DEL]    -168  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessMultirotor.cpp
  [DEL]    -240  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessRotors.cpp
  [DEL]    -120  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessRoverAckermann.cpp
  [DEL]    -192  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessStandardVTOL.cpp
  [DEL]    -192  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTailsitterVTOL.cpp
  [DEL]    -216  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTiltrotorVTOL.cpp
  [DEL]    -192  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTilts.cpp
  [DEL]    -176  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessUUV.cpp
  +574% +2.27Ki  [ = ]       0    [17 Others]
-0.0%      -4  [ = ]       0    .debug_info
  [NEW] +19.3Ki  [ = ]       0    ../../src/lib/allocation/actuator_effectiveness/ActuatorEffectiveness.cpp
  [NEW] +21.7Ki  [ = ]       0    ../../src/lib/allocation/control_allocation/ControlAllocation.cpp
  [NEW] +37.1Ki  [ = ]       0    ../../src/lib/allocation/control_allocation/ControlAllocationPseudoInverse.cpp
  [NEW] +41.0Ki  [ = ]       0    ../../src/lib/allocation/control_allocation/ControlAllocationSequentialDesaturation.cpp
  -0.2%      -4  [ = ]       0    ../../src/lib/version/version.c
  [DEL] -19.3Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectiveness.cpp
  [DEL] -41.8Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessControlSurfaces.cpp
  [DEL] -40.4Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessCustom.cpp
  [DEL] -44.1Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessFixedWing.cpp
  [DEL] -52.1Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp
  [DEL] -50.0Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopterCoaxial.cpp
  [DEL] -43.5Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessMCTilt.cpp
  [DEL] -39.4Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessMultirotor.cpp
  [DEL] -59.1Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessRotors.cpp
  [DEL] -20.0Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessRoverAckermann.cpp
  [DEL] -44.8Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessStandardVTOL.cpp
  [DEL] -45.1Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTailsitterVTOL.cpp
  [DEL] -51.6Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTiltrotorVTOL.cpp
  [DEL] -51.9Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTilts.cpp
  [DEL] -39.7Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessUUV.cpp
  +425%  +523Ki  [ = ]       0    [17 Others]
+0.0%    +748  [ = ]       0    .debug_line
  [NEW] +1.86Ki  [ = ]       0    ../../src/lib/allocation/actuator_effectiveness/ActuatorEffectiveness.cpp
  [NEW] +2.60Ki  [ = ]       0    ../../src/lib/allocation/control_allocation/ControlAllocation.cpp
  [NEW] +5.30Ki  [ = ]       0    ../../src/lib/allocation/control_allocation/ControlAllocationPseudoInverse.cpp
  [NEW] +4.29Ki  [ = ]       0    ../../src/lib/allocation/control_allocation/ControlAllocationSequentialDesaturation.cpp
  -1.3%     -25  [ = ]       0    ../../src/lib/version/version.c
  [DEL] -1.87Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectiveness.cpp
  [DEL] -4.11Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessControlSurfaces.cpp
  [DEL] -3.47Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessCustom.cpp
  [DEL] -3.88Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessFixedWing.cpp
  [DEL] -5.67Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp
  [DEL] -4.85Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopterCoaxial.cpp
  [DEL] -4.37Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessMCTilt.cpp
  [DEL] -3.04Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessMultirotor.cpp
  [DEL] -7.03Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessRotors.cpp
  [DEL] -1.69Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessRoverAckermann.cpp
  [DEL] -4.05Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessStandardVTOL.cpp
  [DEL] -4.03Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTailsitterVTOL.cpp
  [DEL] -6.24Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTiltrotorVTOL.cpp
  [DEL] -4.76Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTilts.cpp
  [DEL] -3.11Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessUUV.cpp
   +56% +48.9Ki  [ = ]       0    [19 Others]
-0.0%      -6  [ = ]       0    .debug_ranges
  [NEW]    +184  [ = ]       0    ../../src/lib/allocation/actuator_effectiveness/ActuatorEffectiveness.cpp
  [NEW]    +864  [ = ]       0    ../../src/lib/allocation/control_allocation/ControlAllocation.cpp
  [NEW] +2.74Ki  [ = ]       0    ../../src/lib/allocation/control_allocation/ControlAllocationPseudoInverse.cpp
  [NEW]    +912  [ = ]       0    ../../src/lib/allocation/control_allocation/ControlAllocationSequentialDesaturation.cpp
  -2.6%      -8  [ = ]       0    ../../src/lib/version/version.c
  [DEL]    -184  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectiveness.cpp
  [DEL] -1.26Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessControlSurfaces.cpp
  [DEL] -1.27Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessCustom.cpp
  [DEL] -1.41Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessFixedWing.cpp
  [DEL] -1.95Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp
  [DEL] -1.66Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopterCoaxial.cpp
  [DEL] -1.63Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessMCTilt.cpp
  [DEL]    -984  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessMultirotor.cpp
  [DEL] -2.81Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessRotors.cpp
  [DEL]    -232  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessRoverAckermann.cpp
  [DEL] -1.66Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessStandardVTOL.cpp
  [DEL] -1.62Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTailsitterVTOL.cpp
  [DEL] -2.62Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTiltrotorVTOL.cpp
  [DEL] -1.81Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTilts.cpp
  [DEL]    -992  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessUUV.cpp
  +283% +17.4Ki  [ = ]       0    [18 Others]
+0.0%     +58  [ = ]       0    .debug_str
  +0.1%     +58  [ = ]       0    
  [NEW]    +255  [ = ]       0    ../../src/lib/allocation/actuator_effectiveness/ActuatorEffectiveness.cpp
  [NEW]    +871  [ = ]       0    ../../src/lib/allocation/control_allocation/ControlAllocation.cpp
  [NEW] +9.24Ki  [ = ]       0    ../../src/lib/allocation/control_allocation/ControlAllocationPseudoInverse.cpp
  [NEW]    +879  [ = ]       0    ../../src/lib/allocation/control_allocation/ControlAllocationSequentialDesaturation.cpp
  [DEL]    -255  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectiveness.cpp
  [DEL]    -618  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessControlSurfaces.cpp
  [DEL]    -847  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessCustom.cpp
  [DEL]    -997  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessFixedWing.cpp
  [DEL] -1.51Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp
  [DEL]    -921  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopterCoaxial.cpp
  [DEL] -1.67Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessMCTilt.cpp
  [DEL]    -408  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessMultirotor.cpp
  [DEL] -1.17Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessRotors.cpp
  [DEL]    -376  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessRoverAckermann.cpp
  [DEL]    -739  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessStandardVTOL.cpp
  [DEL]    -735  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTailsitterVTOL.cpp
  [DEL] -1.07Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTiltrotorVTOL.cpp
  [DEL]    -244  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTilts.cpp
  [DEL]    -944  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessUUV.cpp
 -89.6% +1.14Ki  [ = ]       0    [17 Others]
-0.3%     -40  [ = ]       0    [Unmapped]
+0.0%    +844  +0.0%     +40    TOTAL

px4_fmu-v6x [Total VM Diff: 40 byte (0 %)]
    FILE SIZE        VM SIZE    
--------------  -------------- 
+0.0%     +40  +0.0%     +40    .text
  [NEW] +3.29Ki  [NEW] +3.29Ki    ../../src/lib/allocation/control_allocation/ControlAllocationPseudoInverse.cpp
  [NEW] +2.32Ki  [NEW] +2.32Ki    ../../src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessTiltrotorVTOL.cpp
  [NEW] +2.07Ki  [NEW] +2.07Ki    ../../src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp
  [NEW] +1.98Ki  [NEW] +1.98Ki    ../../src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessRotors.cpp
  [NEW] +1.57Ki  [NEW] +1.57Ki    ../../src/lib/allocation/control_allocation/ControlAllocationSequentialDesaturation.cpp
  [NEW] +1.49Ki  [NEW] +1.49Ki    ../../src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessHelicopterCoaxial.cpp
  [NEW] +1.09Ki  [NEW] +1.09Ki    ../../src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessTilts.cpp
  [NEW] +1.04Ki  [NEW] +1.04Ki    ../../src/lib/allocation/control_allocation/ControlAllocation.cpp
  [NEW] +1.04Ki  [NEW] +1.04Ki    ../../src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessMCTilt.cpp
  [NEW] +1.01Ki  [NEW] +1.01Ki    ../../src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessControlSurfaces.cpp
 -100.0%     +40 -100.0%     +40    [18 Others]
  [DEL] -1.01Ki  [DEL] -1.01Ki    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessControlSurfaces.cpp
  [DEL] -1.04Ki  [DEL] -1.04Ki    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessMCTilt.cpp
  [DEL] -1.04Ki  [DEL] -1.04Ki    ../../src/modules/control_allocator/ControlAllocation/ControlAllocation.cpp
  [DEL] -1.09Ki  [DEL] -1.09Ki    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTilts.cpp
  [DEL] -1.49Ki  [DEL] -1.49Ki    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopterCoaxial.cpp
  [DEL] -1.57Ki  [DEL] -1.57Ki    ../../src/modules/control_allocator/ControlAllocation/ControlAllocationSequentialDesaturation.cpp
  [DEL] -1.98Ki  [DEL] -1.98Ki    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessRotors.cpp
  [DEL] -2.07Ki  [DEL] -2.07Ki    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp
  [DEL] -2.32Ki  [DEL] -2.32Ki    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTiltrotorVTOL.cpp
  [DEL] -3.29Ki  [DEL] -3.29Ki    ../../src/modules/control_allocator/ControlAllocation/ControlAllocationPseudoInverse.cpp
+0.0%     +56  [ = ]       0    .debug_abbrev
  [NEW] +1.82Ki  [ = ]       0    ../../src/lib/allocation/actuator_effectiveness/ActuatorEffectiveness.cpp
  [NEW] +1.84Ki  [ = ]       0    ../../src/lib/allocation/control_allocation/ControlAllocation.cpp
  [NEW] +2.32Ki  [ = ]       0    ../../src/lib/allocation/control_allocation/ControlAllocationPseudoInverse.cpp
  [NEW] +2.47Ki  [ = ]       0    ../../src/lib/allocation/control_allocation/ControlAllocationSequentialDesaturation.cpp
   +11%     +56  [ = ]       0    ../../src/lib/version/version.c
  [DEL] -1.82Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectiveness.cpp
  [DEL] -2.56Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessControlSurfaces.cpp
  [DEL] -2.54Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessCustom.cpp
  [DEL] -2.55Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessFixedWing.cpp
  [DEL] -2.85Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp
  [DEL] -2.77Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopterCoaxial.cpp
  [DEL] -2.59Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessMCTilt.cpp
  [DEL] -2.47Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessMultirotor.cpp
  [DEL] -3.15Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessRotors.cpp
  [DEL] -1.84Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessRoverAckermann.cpp
  [DEL] -2.48Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessStandardVTOL.cpp
  [DEL] -2.52Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTailsitterVTOL.cpp
  [DEL] -2.72Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTiltrotorVTOL.cpp
  [DEL] -2.75Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTilts.cpp
  [DEL] -2.48Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessUUV.cpp
  +347% +29.7Ki  [ = ]       0    [17 Others]
-0.0%      -8  [ = ]       0    .debug_aranges
  [NEW]    +128  [ = ]       0    ../../src/lib/allocation/actuator_effectiveness/ActuatorEffectiveness.cpp
  [NEW]     +80  [ = ]       0    ../../src/lib/allocation/control_allocation/ControlAllocation.cpp
  [NEW]    +120  [ = ]       0    ../../src/lib/allocation/control_allocation/ControlAllocationPseudoInverse.cpp
  [NEW]    +144  [ = ]       0    ../../src/lib/allocation/control_allocation/ControlAllocationSequentialDesaturation.cpp
  -5.0%      -8  [ = ]       0    ../../src/lib/version/version.c
  [DEL]    -128  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectiveness.cpp
  [DEL]    -192  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessControlSurfaces.cpp
  [DEL]    -176  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessCustom.cpp
  [DEL]    -184  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessFixedWing.cpp
  [DEL]    -224  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp
  [DEL]    -208  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopterCoaxial.cpp
  [DEL]    -184  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessMCTilt.cpp
  [DEL]    -168  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessMultirotor.cpp
  [DEL]    -240  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessRotors.cpp
  [DEL]    -120  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessRoverAckermann.cpp
  [DEL]    -192  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessStandardVTOL.cpp
  [DEL]    -192  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTailsitterVTOL.cpp
  [DEL]    -216  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTiltrotorVTOL.cpp
  [DEL]    -192  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTilts.cpp
  [DEL]    -176  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessUUV.cpp
  +574% +2.27Ki  [ = ]       0    [17 Others]
-0.0%      -4  [ = ]       0    .debug_info
  [NEW] +19.3Ki  [ = ]       0    ../../src/lib/allocation/actuator_effectiveness/ActuatorEffectiveness.cpp
  [NEW] +21.7Ki  [ = ]       0    ../../src/lib/allocation/control_allocation/ControlAllocation.cpp
  [NEW] +37.1Ki  [ = ]       0    ../../src/lib/allocation/control_allocation/ControlAllocationPseudoInverse.cpp
  [NEW] +40.5Ki  [ = ]       0    ../../src/lib/allocation/control_allocation/ControlAllocationSequentialDesaturation.cpp
  -0.2%      -4  [ = ]       0    ../../src/lib/version/version.c
  [DEL] -19.3Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectiveness.cpp
  [DEL] -41.4Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessControlSurfaces.cpp
  [DEL] -40.0Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessCustom.cpp
  [DEL] -43.7Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessFixedWing.cpp
  [DEL] -51.7Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp
  [DEL] -49.5Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopterCoaxial.cpp
  [DEL] -43.1Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessMCTilt.cpp
  [DEL] -38.9Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessMultirotor.cpp
  [DEL] -58.6Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessRotors.cpp
  [DEL] -20.0Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessRoverAckermann.cpp
  [DEL] -44.4Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessStandardVTOL.cpp
  [DEL] -44.6Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTailsitterVTOL.cpp
  [DEL] -51.1Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTiltrotorVTOL.cpp
  [DEL] -51.4Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTilts.cpp
  [DEL] -39.2Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessUUV.cpp
  +422%  +518Ki  [ = ]       0    [17 Others]
+0.0%    +748  [ = ]       0    .debug_line
  [NEW] +1.86Ki  [ = ]       0    ../../src/lib/allocation/actuator_effectiveness/ActuatorEffectiveness.cpp
  [NEW] +2.60Ki  [ = ]       0    ../../src/lib/allocation/control_allocation/ControlAllocation.cpp
  [NEW] +5.30Ki  [ = ]       0    ../../src/lib/allocation/control_allocation/ControlAllocationPseudoInverse.cpp
  [NEW] +4.29Ki  [ = ]       0    ../../src/lib/allocation/control_allocation/ControlAllocationSequentialDesaturation.cpp
  -1.3%     -25  [ = ]       0    ../../src/lib/version/version.c
  [DEL] -1.87Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectiveness.cpp
  [DEL] -4.11Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessControlSurfaces.cpp
  [DEL] -3.47Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessCustom.cpp
  [DEL] -3.88Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessFixedWing.cpp
  [DEL] -5.67Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp
  [DEL] -4.85Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopterCoaxial.cpp
  [DEL] -4.37Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessMCTilt.cpp
  [DEL] -3.04Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessMultirotor.cpp
  [DEL] -7.03Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessRotors.cpp
  [DEL] -1.69Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessRoverAckermann.cpp
  [DEL] -4.05Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessStandardVTOL.cpp
  [DEL] -4.03Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTailsitterVTOL.cpp
  [DEL] -6.24Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTiltrotorVTOL.cpp
  [DEL] -4.76Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTilts.cpp
  [DEL] -3.11Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessUUV.cpp
   +56% +48.9Ki  [ = ]       0    [19 Others]
-0.0%      -6  [ = ]       0    .debug_ranges
  [NEW]    +184  [ = ]       0    ../../src/lib/allocation/actuator_effectiveness/ActuatorEffectiveness.cpp
  [NEW]    +864  [ = ]       0    ../../src/lib/allocation/control_allocation/ControlAllocation.cpp
  [NEW] +2.74Ki  [ = ]       0    ../../src/lib/allocation/control_allocation/ControlAllocationPseudoInverse.cpp
  [NEW]    +912  [ = ]       0    ../../src/lib/allocation/control_allocation/ControlAllocationSequentialDesaturation.cpp
  -2.6%      -8  [ = ]       0    ../../src/lib/version/version.c
  [DEL]    -184  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectiveness.cpp
  [DEL] -1.26Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessControlSurfaces.cpp
  [DEL] -1.27Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessCustom.cpp
  [DEL] -1.41Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessFixedWing.cpp
  [DEL] -1.95Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp
  [DEL] -1.66Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopterCoaxial.cpp
  [DEL] -1.63Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessMCTilt.cpp
  [DEL]    -984  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessMultirotor.cpp
  [DEL] -2.81Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessRotors.cpp
  [DEL]    -232  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessRoverAckermann.cpp
  [DEL] -1.66Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessStandardVTOL.cpp
  [DEL] -1.62Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTailsitterVTOL.cpp
  [DEL] -2.62Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTiltrotorVTOL.cpp
  [DEL] -1.81Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTilts.cpp
  [DEL]    -992  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessUUV.cpp
  +283% +17.4Ki  [ = ]       0    [18 Others]
+0.0%     +58  [ = ]       0    .debug_str
  +0.1%     +58  [ = ]       0    
  [NEW]    +255  [ = ]       0    ../../src/lib/allocation/actuator_effectiveness/ActuatorEffectiveness.cpp
  [NEW]    +871  [ = ]       0    ../../src/lib/allocation/control_allocation/ControlAllocation.cpp
  [NEW] +9.24Ki  [ = ]       0    ../../src/lib/allocation/control_allocation/ControlAllocationPseudoInverse.cpp
  [NEW]    +879  [ = ]       0    ../../src/lib/allocation/control_allocation/ControlAllocationSequentialDesaturation.cpp
  [DEL]    -255  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectiveness.cpp
  [DEL]    -618  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessControlSurfaces.cpp
  [DEL]    -847  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessCustom.cpp
  [DEL]    -997  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessFixedWing.cpp
  [DEL] -1.51Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp
  [DEL]    -921  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopterCoaxial.cpp
  [DEL] -1.67Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessMCTilt.cpp
  [DEL]    -408  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessMultirotor.cpp
  [DEL] -1.17Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessRotors.cpp
  [DEL]    -376  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessRoverAckermann.cpp
  [DEL]    -739  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessStandardVTOL.cpp
  [DEL]    -735  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTailsitterVTOL.cpp
  [DEL] -1.07Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTiltrotorVTOL.cpp
  [DEL]    -244  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTilts.cpp
  [DEL]    -944  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessUUV.cpp
 -89.6% +1.14Ki  [ = ]       0    [17 Others]
-0.1%     -40  [ = ]       0    [Unmapped]
+0.0%    +844  +0.0%     +40    TOTAL

Updated: 2025-01-13T21:02:10

@Jaeyoung-Lim Jaeyoung-Lim requested a review from sfuhrer January 13, 2025 17:07
@Pedro-Roque Pedro-Roque force-pushed the pr-metric-allocator-library branch from f60507b to b257fe9 Compare January 13, 2025 19:59
@Pedro-Roque Pedro-Roque changed the title Control Allocator: Overhaul Control Allocator: Metric Jan 13, 2025
@Pedro-Roque Pedro-Roque marked this pull request as ready for review January 13, 2025 20:17
bool update_normalization_scale)
{
ControlAllocation::setEffectivenessMatrix(effectiveness, actuator_trim, linearization_point, num_actuators,
update_normalization_scale);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is update_normalization_scale ever used?

Copy link
Member Author

@Pedro-Roque Pedro-Roque Jan 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not by metric allocator. It is used here in ControlAllocationPseudoInverse.cpp lines 53 and 62.

Copy link
Member Author

@Pedro-Roque Pedro-Roque Jan 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue is that if this is removed, than the code in

_control_allocation[i]->setEffectivenessMatrix(config.effectiveness_matrices[i], config.trim[i],
config.linearization_point[i], total_num_actuators, reason == EffectivenessUpdateReason::CONFIGURATION_UPDATE);
will break if the metric allocator is used there.

I can, however, remove it to avoid confusion and assume that if the user wishes to use it with control_allocator, there will be trouble. Perhaps that's the correct way?

@Pedro-Roque
Copy link
Member Author

@Jaeyoung-Lim I set the parameter to false to make it clear that we don't care about normalization in metric allocator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants