Separate vehicle specific actuator effectiveness

Keep actuator effectivenss in control allocator
This commit is contained in:
Jaeyoung-Lim 2025-01-10 18:14:35 +01:00
parent a164aa7be8
commit dac5ae050f
33 changed files with 57 additions and 45 deletions

View File

@ -34,34 +34,6 @@
px4_add_library(ActuatorEffectiveness
ActuatorEffectiveness.cpp
ActuatorEffectiveness.hpp
ActuatorEffectivenessUUV.cpp
ActuatorEffectivenessUUV.hpp
ActuatorEffectivenessControlSurfaces.cpp
ActuatorEffectivenessControlSurfaces.hpp
ActuatorEffectivenessCustom.cpp
ActuatorEffectivenessCustom.hpp
ActuatorEffectivenessFixedWing.cpp
ActuatorEffectivenessFixedWing.hpp
ActuatorEffectivenessHelicopter.cpp
ActuatorEffectivenessHelicopter.hpp
ActuatorEffectivenessHelicopterCoaxial.cpp
ActuatorEffectivenessHelicopterCoaxial.hpp
ActuatorEffectivenessMCTilt.cpp
ActuatorEffectivenessMCTilt.hpp
ActuatorEffectivenessMultirotor.cpp
ActuatorEffectivenessMultirotor.hpp
ActuatorEffectivenessTilts.cpp
ActuatorEffectivenessTilts.hpp
ActuatorEffectivenessRotors.cpp
ActuatorEffectivenessRotors.hpp
ActuatorEffectivenessStandardVTOL.cpp
ActuatorEffectivenessStandardVTOL.hpp
ActuatorEffectivenessTiltrotorVTOL.cpp
ActuatorEffectivenessTiltrotorVTOL.hpp
ActuatorEffectivenessTailsitterVTOL.cpp
ActuatorEffectivenessTailsitterVTOL.hpp
ActuatorEffectivenessRoverAckermann.hpp
ActuatorEffectivenessRoverAckermann.cpp
)
target_compile_options(ActuatorEffectiveness PRIVATE ${MAX_CUSTOM_OPT_LEVEL})
@ -70,6 +42,3 @@ target_link_libraries(ActuatorEffectiveness
PRIVATE
mathlib
)
px4_add_functional_gtest(SRC ActuatorEffectivenessHelicopterTest.cpp LINKLIBS ActuatorEffectiveness)
px4_add_functional_gtest(SRC ActuatorEffectivenessRotorsTest.cpp LINKLIBS ActuatorEffectiveness)

View File

@ -32,6 +32,7 @@
############################################################################
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
add_subdirectory(VehicleActuatorEffectiveness)
px4_add_module(
MODULE modules__control_allocator
@ -48,6 +49,7 @@ px4_add_module(
DEPENDS
mathlib
ActuatorEffectiveness
VehicleActuatorEffectiveness
ControlAllocation
px4_work_queue
SlewRate

View File

@ -33,7 +33,7 @@
#pragma once
#include "ActuatorEffectiveness.hpp"
#include "actuator_effectiveness/ActuatorEffectiveness.hpp"
#include <px4_platform_common/module_params.h>
#include <lib/slew_rate/SlewRate.hpp>

View File

@ -33,7 +33,7 @@
#pragma once
#include "ActuatorEffectiveness.hpp"
#include "actuator_effectiveness/ActuatorEffectiveness.hpp"
#include "ActuatorEffectivenessRotors.hpp"
#include "ActuatorEffectivenessControlSurfaces.hpp"

View File

@ -33,7 +33,7 @@
#pragma once
#include "ActuatorEffectiveness.hpp"
#include "actuator_effectiveness/ActuatorEffectiveness.hpp"
#include "ActuatorEffectivenessRotors.hpp"
#include "ActuatorEffectivenessControlSurfaces.hpp"

View File

@ -33,7 +33,7 @@
#pragma once
#include "ActuatorEffectiveness.hpp"
#include "actuator_effectiveness/ActuatorEffectiveness.hpp"
#include <px4_platform_common/module_params.h>

View File

@ -33,7 +33,7 @@
#pragma once
#include "ActuatorEffectiveness.hpp"
#include "actuator_effectiveness/ActuatorEffectiveness.hpp"
#include <px4_platform_common/module_params.h>

View File

@ -33,7 +33,7 @@
#pragma once
#include "ActuatorEffectiveness.hpp"
#include "actuator_effectiveness/ActuatorEffectiveness.hpp"
#include "ActuatorEffectivenessRotors.hpp"
#include "ActuatorEffectivenessTilts.hpp"

View File

@ -33,7 +33,7 @@
#pragma once
#include "ActuatorEffectiveness.hpp"
#include "actuator_effectiveness/ActuatorEffectiveness.hpp"
#include "ActuatorEffectivenessRotors.hpp"
class ActuatorEffectivenessMultirotor : public ModuleParams, public ActuatorEffectiveness

View File

@ -41,7 +41,7 @@
#pragma once
#include "ActuatorEffectiveness.hpp"
#include "actuator_effectiveness/ActuatorEffectiveness.hpp"
#include <px4_platform_common/module_params.h>
#include <uORB/Subscription.hpp>

View File

@ -33,7 +33,7 @@
#pragma once
#include "ActuatorEffectiveness.hpp"
#include "actuator_effectiveness/ActuatorEffectiveness.hpp"
class ActuatorEffectivenessRoverAckermann : public ActuatorEffectiveness
{

View File

@ -41,7 +41,7 @@
#pragma once
#include "ActuatorEffectiveness.hpp"
#include "actuator_effectiveness/ActuatorEffectiveness.hpp"
#include "ActuatorEffectivenessRotors.hpp"
#include "ActuatorEffectivenessControlSurfaces.hpp"

View File

@ -39,7 +39,7 @@
#pragma once
#include "ActuatorEffectiveness.hpp"
#include "actuator_effectiveness/ActuatorEffectiveness.hpp"
#include "ActuatorEffectivenessRotors.hpp"
#include "ActuatorEffectivenessControlSurfaces.hpp"

View File

@ -41,7 +41,7 @@
#pragma once
#include "ActuatorEffectiveness.hpp"
#include "actuator_effectiveness/ActuatorEffectiveness.hpp"
#include "ActuatorEffectivenessRotors.hpp"
#include "ActuatorEffectivenessControlSurfaces.hpp"
#include "ActuatorEffectivenessTilts.hpp"

View File

@ -33,7 +33,7 @@
#pragma once
#include "ActuatorEffectiveness.hpp"
#include "actuator_effectiveness/ActuatorEffectiveness.hpp"
#include "ActuatorEffectivenessRotors.hpp"
#include <px4_platform_common/module_params.h>

View File

@ -33,7 +33,7 @@
#pragma once
#include "ActuatorEffectiveness.hpp"
#include "actuator_effectiveness/ActuatorEffectiveness.hpp"
#include "ActuatorEffectivenessRotors.hpp"
class ActuatorEffectivenessUUV : public ModuleParams, public ActuatorEffectiveness

View File

@ -0,0 +1,41 @@
px4_add_library(VehicleActuatorEffectiveness
ActuatorEffectivenessUUV.cpp
ActuatorEffectivenessUUV.hpp
ActuatorEffectivenessControlSurfaces.cpp
ActuatorEffectivenessControlSurfaces.hpp
ActuatorEffectivenessCustom.cpp
ActuatorEffectivenessCustom.hpp
ActuatorEffectivenessFixedWing.cpp
ActuatorEffectivenessFixedWing.hpp
ActuatorEffectivenessHelicopter.cpp
ActuatorEffectivenessHelicopter.hpp
ActuatorEffectivenessHelicopterCoaxial.cpp
ActuatorEffectivenessHelicopterCoaxial.hpp
ActuatorEffectivenessMCTilt.cpp
ActuatorEffectivenessMCTilt.hpp
ActuatorEffectivenessMultirotor.cpp
ActuatorEffectivenessMultirotor.hpp
ActuatorEffectivenessTilts.cpp
ActuatorEffectivenessTilts.hpp
ActuatorEffectivenessRotors.cpp
ActuatorEffectivenessRotors.hpp
ActuatorEffectivenessStandardVTOL.cpp
ActuatorEffectivenessStandardVTOL.hpp
ActuatorEffectivenessTiltrotorVTOL.cpp
ActuatorEffectivenessTiltrotorVTOL.hpp
ActuatorEffectivenessTailsitterVTOL.cpp
ActuatorEffectivenessTailsitterVTOL.hpp
ActuatorEffectivenessRoverAckermann.hpp
ActuatorEffectivenessRoverAckermann.cpp
)
target_compile_options(VehicleActuatorEffectiveness PRIVATE ${MAX_CUSTOM_OPT_LEVEL})
target_include_directories(VehicleActuatorEffectiveness PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(VehicleActuatorEffectiveness
PRIVATE
mathlib
ActuatorEffectiveness
)
px4_add_functional_gtest(SRC ActuatorEffectivenessHelicopterTest.cpp LINKLIBS VehicleActuatorEffectiveness)
px4_add_functional_gtest(SRC ActuatorEffectivenessRotorsTest.cpp LINKLIBS VehicleActuatorEffectiveness)