From b257fe9abd8a085fb031be101e93ac87e8ca3460 Mon Sep 17 00:00:00 2001 From: JaeyoungLim Date: Mon, 13 Jan 2025 12:55:42 +0100 Subject: [PATCH] Group library directories Fix --- src/lib/CMakeLists.txt | 3 +- src/lib/allocation/CMakeLists.txt | 35 +++++++++++++++++++ .../ActuatorEffectiveness.cpp | 0 .../ActuatorEffectiveness.hpp | 0 .../actuator_effectiveness/CMakeLists.txt | 0 .../control_allocation/CMakeLists.txt | 0 .../control_allocation/ControlAllocation.cpp | 0 .../control_allocation/ControlAllocation.hpp | 2 +- .../ControlAllocationPseudoInverse.cpp | 0 .../ControlAllocationPseudoInverse.hpp | 0 .../ControlAllocationPseudoInverseTest.cpp | 0 ...ontrolAllocationSequentialDesaturation.cpp | 0 ...ontrolAllocationSequentialDesaturation.hpp | 0 ...olAllocationSequentialDesaturationTest.cpp | 0 .../ActuatorEffectivenessControlSurfaces.hpp | 2 +- .../ActuatorEffectivenessCustom.hpp | 2 +- .../ActuatorEffectivenessFixedWing.hpp | 2 +- .../ActuatorEffectivenessHelicopter.hpp | 2 +- ...ActuatorEffectivenessHelicopterCoaxial.hpp | 2 +- .../ActuatorEffectivenessMCTilt.hpp | 2 +- .../ActuatorEffectivenessMultirotor.hpp | 2 +- .../ActuatorEffectivenessRotors.hpp | 2 +- .../ActuatorEffectivenessRoverAckermann.hpp | 2 +- .../ActuatorEffectivenessStandardVTOL.hpp | 2 +- .../ActuatorEffectivenessTailsitterVTOL.hpp | 2 +- .../ActuatorEffectivenessTiltrotorVTOL.hpp | 2 +- .../ActuatorEffectivenessTilts.hpp | 2 +- .../ActuatorEffectivenessUUV.hpp | 2 +- 28 files changed, 51 insertions(+), 17 deletions(-) create mode 100644 src/lib/allocation/CMakeLists.txt rename src/lib/{ => allocation}/actuator_effectiveness/ActuatorEffectiveness.cpp (100%) rename src/lib/{ => allocation}/actuator_effectiveness/ActuatorEffectiveness.hpp (100%) rename src/lib/{ => allocation}/actuator_effectiveness/CMakeLists.txt (100%) rename src/lib/{ => allocation}/control_allocation/CMakeLists.txt (100%) rename src/lib/{ => allocation}/control_allocation/ControlAllocation.cpp (100%) rename src/lib/{ => allocation}/control_allocation/ControlAllocation.hpp (99%) rename src/lib/{ => allocation}/control_allocation/ControlAllocationPseudoInverse.cpp (100%) rename src/lib/{ => allocation}/control_allocation/ControlAllocationPseudoInverse.hpp (100%) rename src/lib/{ => allocation}/control_allocation/ControlAllocationPseudoInverseTest.cpp (100%) rename src/lib/{ => allocation}/control_allocation/ControlAllocationSequentialDesaturation.cpp (100%) rename src/lib/{ => allocation}/control_allocation/ControlAllocationSequentialDesaturation.hpp (100%) rename src/lib/{ => allocation}/control_allocation/ControlAllocationSequentialDesaturationTest.cpp (100%) diff --git a/src/lib/CMakeLists.txt b/src/lib/CMakeLists.txt index cdd347da75ba..7d6f14b29510 100644 --- a/src/lib/CMakeLists.txt +++ b/src/lib/CMakeLists.txt @@ -31,9 +31,9 @@ # ############################################################################ -add_subdirectory(actuator_effectiveness EXCLUDE_FROM_ALL) add_subdirectory(adsb EXCLUDE_FROM_ALL) add_subdirectory(airspeed EXCLUDE_FROM_ALL) +add_subdirectory(allocation EXCLUDE_FROM_ALL) add_subdirectory(atmosphere EXCLUDE_FROM_ALL) add_subdirectory(avoidance EXCLUDE_FROM_ALL) add_subdirectory(battery EXCLUDE_FROM_ALL) @@ -44,7 +44,6 @@ add_subdirectory(cdrstream EXCLUDE_FROM_ALL) add_subdirectory(circuit_breaker EXCLUDE_FROM_ALL) add_subdirectory(collision_prevention EXCLUDE_FROM_ALL) add_subdirectory(component_information EXCLUDE_FROM_ALL) -add_subdirectory(control_allocation EXCLUDE_FROM_ALL) add_subdirectory(controllib EXCLUDE_FROM_ALL) add_subdirectory(conversion EXCLUDE_FROM_ALL) add_subdirectory(crc EXCLUDE_FROM_ALL) diff --git a/src/lib/allocation/CMakeLists.txt b/src/lib/allocation/CMakeLists.txt new file mode 100644 index 000000000000..f7c710b7f28a --- /dev/null +++ b/src/lib/allocation/CMakeLists.txt @@ -0,0 +1,35 @@ +############################################################################ +# +# Copyright (c) 2025 PX4 Development Team. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name PX4 nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +add_subdirectory(control_allocation) +add_subdirectory(actuator_effectiveness) diff --git a/src/lib/actuator_effectiveness/ActuatorEffectiveness.cpp b/src/lib/allocation/actuator_effectiveness/ActuatorEffectiveness.cpp similarity index 100% rename from src/lib/actuator_effectiveness/ActuatorEffectiveness.cpp rename to src/lib/allocation/actuator_effectiveness/ActuatorEffectiveness.cpp diff --git a/src/lib/actuator_effectiveness/ActuatorEffectiveness.hpp b/src/lib/allocation/actuator_effectiveness/ActuatorEffectiveness.hpp similarity index 100% rename from src/lib/actuator_effectiveness/ActuatorEffectiveness.hpp rename to src/lib/allocation/actuator_effectiveness/ActuatorEffectiveness.hpp diff --git a/src/lib/actuator_effectiveness/CMakeLists.txt b/src/lib/allocation/actuator_effectiveness/CMakeLists.txt similarity index 100% rename from src/lib/actuator_effectiveness/CMakeLists.txt rename to src/lib/allocation/actuator_effectiveness/CMakeLists.txt diff --git a/src/lib/control_allocation/CMakeLists.txt b/src/lib/allocation/control_allocation/CMakeLists.txt similarity index 100% rename from src/lib/control_allocation/CMakeLists.txt rename to src/lib/allocation/control_allocation/CMakeLists.txt diff --git a/src/lib/control_allocation/ControlAllocation.cpp b/src/lib/allocation/control_allocation/ControlAllocation.cpp similarity index 100% rename from src/lib/control_allocation/ControlAllocation.cpp rename to src/lib/allocation/control_allocation/ControlAllocation.cpp diff --git a/src/lib/control_allocation/ControlAllocation.hpp b/src/lib/allocation/control_allocation/ControlAllocation.hpp similarity index 99% rename from src/lib/control_allocation/ControlAllocation.hpp rename to src/lib/allocation/control_allocation/ControlAllocation.hpp index a7d7d41ed36d..bd770b3b4b6c 100644 --- a/src/lib/control_allocation/ControlAllocation.hpp +++ b/src/lib/allocation/control_allocation/ControlAllocation.hpp @@ -71,7 +71,7 @@ #include -#include "actuator_effectiveness/ActuatorEffectiveness.hpp" +#include "allocation/actuator_effectiveness/ActuatorEffectiveness.hpp" class ControlAllocation { diff --git a/src/lib/control_allocation/ControlAllocationPseudoInverse.cpp b/src/lib/allocation/control_allocation/ControlAllocationPseudoInverse.cpp similarity index 100% rename from src/lib/control_allocation/ControlAllocationPseudoInverse.cpp rename to src/lib/allocation/control_allocation/ControlAllocationPseudoInverse.cpp diff --git a/src/lib/control_allocation/ControlAllocationPseudoInverse.hpp b/src/lib/allocation/control_allocation/ControlAllocationPseudoInverse.hpp similarity index 100% rename from src/lib/control_allocation/ControlAllocationPseudoInverse.hpp rename to src/lib/allocation/control_allocation/ControlAllocationPseudoInverse.hpp diff --git a/src/lib/control_allocation/ControlAllocationPseudoInverseTest.cpp b/src/lib/allocation/control_allocation/ControlAllocationPseudoInverseTest.cpp similarity index 100% rename from src/lib/control_allocation/ControlAllocationPseudoInverseTest.cpp rename to src/lib/allocation/control_allocation/ControlAllocationPseudoInverseTest.cpp diff --git a/src/lib/control_allocation/ControlAllocationSequentialDesaturation.cpp b/src/lib/allocation/control_allocation/ControlAllocationSequentialDesaturation.cpp similarity index 100% rename from src/lib/control_allocation/ControlAllocationSequentialDesaturation.cpp rename to src/lib/allocation/control_allocation/ControlAllocationSequentialDesaturation.cpp diff --git a/src/lib/control_allocation/ControlAllocationSequentialDesaturation.hpp b/src/lib/allocation/control_allocation/ControlAllocationSequentialDesaturation.hpp similarity index 100% rename from src/lib/control_allocation/ControlAllocationSequentialDesaturation.hpp rename to src/lib/allocation/control_allocation/ControlAllocationSequentialDesaturation.hpp diff --git a/src/lib/control_allocation/ControlAllocationSequentialDesaturationTest.cpp b/src/lib/allocation/control_allocation/ControlAllocationSequentialDesaturationTest.cpp similarity index 100% rename from src/lib/control_allocation/ControlAllocationSequentialDesaturationTest.cpp rename to src/lib/allocation/control_allocation/ControlAllocationSequentialDesaturationTest.cpp diff --git a/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessControlSurfaces.hpp b/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessControlSurfaces.hpp index 446fd44926d9..19ea1768f04e 100644 --- a/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessControlSurfaces.hpp +++ b/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessControlSurfaces.hpp @@ -33,7 +33,7 @@ #pragma once -#include "actuator_effectiveness/ActuatorEffectiveness.hpp" +#include "allocation/actuator_effectiveness/ActuatorEffectiveness.hpp" #include #include diff --git a/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessCustom.hpp b/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessCustom.hpp index c640ba83c765..2cdf0a0abc23 100644 --- a/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessCustom.hpp +++ b/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessCustom.hpp @@ -33,7 +33,7 @@ #pragma once -#include "actuator_effectiveness/ActuatorEffectiveness.hpp" +#include "allocation/actuator_effectiveness/ActuatorEffectiveness.hpp" #include "ActuatorEffectivenessRotors.hpp" #include "ActuatorEffectivenessControlSurfaces.hpp" diff --git a/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessFixedWing.hpp b/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessFixedWing.hpp index 55c6282b46ad..4bc5cdd7b65c 100644 --- a/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessFixedWing.hpp +++ b/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessFixedWing.hpp @@ -33,7 +33,7 @@ #pragma once -#include "actuator_effectiveness/ActuatorEffectiveness.hpp" +#include "allocation/actuator_effectiveness/ActuatorEffectiveness.hpp" #include "ActuatorEffectivenessRotors.hpp" #include "ActuatorEffectivenessControlSurfaces.hpp" diff --git a/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessHelicopter.hpp b/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessHelicopter.hpp index 60e770de0c90..029d46d4f8b1 100644 --- a/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessHelicopter.hpp +++ b/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessHelicopter.hpp @@ -33,7 +33,7 @@ #pragma once -#include "actuator_effectiveness/ActuatorEffectiveness.hpp" +#include "allocation/actuator_effectiveness/ActuatorEffectiveness.hpp" #include diff --git a/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessHelicopterCoaxial.hpp b/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessHelicopterCoaxial.hpp index a01306d972bc..1c31fbb132fc 100644 --- a/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessHelicopterCoaxial.hpp +++ b/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessHelicopterCoaxial.hpp @@ -33,7 +33,7 @@ #pragma once -#include "actuator_effectiveness/ActuatorEffectiveness.hpp" +#include "allocation/actuator_effectiveness/ActuatorEffectiveness.hpp" #include diff --git a/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessMCTilt.hpp b/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessMCTilt.hpp index d35ecadc547b..e6dbef6a4866 100644 --- a/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessMCTilt.hpp +++ b/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessMCTilt.hpp @@ -33,7 +33,7 @@ #pragma once -#include "actuator_effectiveness/ActuatorEffectiveness.hpp" +#include "allocation/actuator_effectiveness/ActuatorEffectiveness.hpp" #include "ActuatorEffectivenessRotors.hpp" #include "ActuatorEffectivenessTilts.hpp" diff --git a/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessMultirotor.hpp b/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessMultirotor.hpp index 11111e073a91..80e6ede0ceb2 100644 --- a/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessMultirotor.hpp +++ b/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessMultirotor.hpp @@ -33,7 +33,7 @@ #pragma once -#include "actuator_effectiveness/ActuatorEffectiveness.hpp" +#include "allocation/actuator_effectiveness/ActuatorEffectiveness.hpp" #include "ActuatorEffectivenessRotors.hpp" class ActuatorEffectivenessMultirotor : public ModuleParams, public ActuatorEffectiveness diff --git a/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessRotors.hpp b/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessRotors.hpp index 48aa604eaea2..d517b24f8ab0 100644 --- a/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessRotors.hpp +++ b/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessRotors.hpp @@ -41,7 +41,7 @@ #pragma once -#include "actuator_effectiveness/ActuatorEffectiveness.hpp" +#include "allocation/actuator_effectiveness/ActuatorEffectiveness.hpp" #include #include diff --git a/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessRoverAckermann.hpp b/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessRoverAckermann.hpp index 5c1388de1501..1862ca8b294d 100644 --- a/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessRoverAckermann.hpp +++ b/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessRoverAckermann.hpp @@ -33,7 +33,7 @@ #pragma once -#include "actuator_effectiveness/ActuatorEffectiveness.hpp" +#include "allocation/actuator_effectiveness/ActuatorEffectiveness.hpp" class ActuatorEffectivenessRoverAckermann : public ActuatorEffectiveness { diff --git a/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessStandardVTOL.hpp b/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessStandardVTOL.hpp index 2160ca929cdb..4eb13c2b26dc 100644 --- a/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessStandardVTOL.hpp +++ b/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessStandardVTOL.hpp @@ -41,7 +41,7 @@ #pragma once -#include "actuator_effectiveness/ActuatorEffectiveness.hpp" +#include "allocation/actuator_effectiveness/ActuatorEffectiveness.hpp" #include "ActuatorEffectivenessRotors.hpp" #include "ActuatorEffectivenessControlSurfaces.hpp" diff --git a/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessTailsitterVTOL.hpp b/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessTailsitterVTOL.hpp index ba5255eb5212..4b4e7f52507d 100644 --- a/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessTailsitterVTOL.hpp +++ b/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessTailsitterVTOL.hpp @@ -39,7 +39,7 @@ #pragma once -#include "actuator_effectiveness/ActuatorEffectiveness.hpp" +#include "allocation/actuator_effectiveness/ActuatorEffectiveness.hpp" #include "ActuatorEffectivenessRotors.hpp" #include "ActuatorEffectivenessControlSurfaces.hpp" diff --git a/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessTiltrotorVTOL.hpp b/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessTiltrotorVTOL.hpp index e96ec61def85..75d1c661e3f2 100644 --- a/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessTiltrotorVTOL.hpp +++ b/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessTiltrotorVTOL.hpp @@ -41,7 +41,7 @@ #pragma once -#include "actuator_effectiveness/ActuatorEffectiveness.hpp" +#include "allocation/actuator_effectiveness/ActuatorEffectiveness.hpp" #include "ActuatorEffectivenessRotors.hpp" #include "ActuatorEffectivenessControlSurfaces.hpp" #include "ActuatorEffectivenessTilts.hpp" diff --git a/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessTilts.hpp b/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessTilts.hpp index 936d0e4b6744..0cb2d4865fda 100644 --- a/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessTilts.hpp +++ b/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessTilts.hpp @@ -33,7 +33,7 @@ #pragma once -#include "actuator_effectiveness/ActuatorEffectiveness.hpp" +#include "allocation/actuator_effectiveness/ActuatorEffectiveness.hpp" #include "ActuatorEffectivenessRotors.hpp" #include diff --git a/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessUUV.hpp b/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessUUV.hpp index 8235747dde74..50a685f76d3f 100644 --- a/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessUUV.hpp +++ b/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessUUV.hpp @@ -33,7 +33,7 @@ #pragma once -#include "actuator_effectiveness/ActuatorEffectiveness.hpp" +#include "allocation/actuator_effectiveness/ActuatorEffectiveness.hpp" #include "ActuatorEffectivenessRotors.hpp" class ActuatorEffectivenessUUV : public ModuleParams, public ActuatorEffectiveness