mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-30 12:53:34 +08:00
Separate vehicle specific actuator effectiveness
Keep actuator effectivenss in control allocator
This commit is contained in:
@@ -34,34 +34,6 @@
|
|||||||
px4_add_library(ActuatorEffectiveness
|
px4_add_library(ActuatorEffectiveness
|
||||||
ActuatorEffectiveness.cpp
|
ActuatorEffectiveness.cpp
|
||||||
ActuatorEffectiveness.hpp
|
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})
|
target_compile_options(ActuatorEffectiveness PRIVATE ${MAX_CUSTOM_OPT_LEVEL})
|
||||||
@@ -70,6 +42,3 @@ target_link_libraries(ActuatorEffectiveness
|
|||||||
PRIVATE
|
PRIVATE
|
||||||
mathlib
|
mathlib
|
||||||
)
|
)
|
||||||
|
|
||||||
px4_add_functional_gtest(SRC ActuatorEffectivenessHelicopterTest.cpp LINKLIBS ActuatorEffectiveness)
|
|
||||||
px4_add_functional_gtest(SRC ActuatorEffectivenessRotorsTest.cpp LINKLIBS ActuatorEffectiveness)
|
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
############################################################################
|
############################################################################
|
||||||
|
|
||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
add_subdirectory(VehicleActuatorEffectiveness)
|
||||||
|
|
||||||
px4_add_module(
|
px4_add_module(
|
||||||
MODULE modules__control_allocator
|
MODULE modules__control_allocator
|
||||||
@@ -48,6 +49,7 @@ px4_add_module(
|
|||||||
DEPENDS
|
DEPENDS
|
||||||
mathlib
|
mathlib
|
||||||
ActuatorEffectiveness
|
ActuatorEffectiveness
|
||||||
|
VehicleActuatorEffectiveness
|
||||||
ControlAllocation
|
ControlAllocation
|
||||||
px4_work_queue
|
px4_work_queue
|
||||||
SlewRate
|
SlewRate
|
||||||
|
|||||||
+1
-1
@@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "ActuatorEffectiveness.hpp"
|
#include "actuator_effectiveness/ActuatorEffectiveness.hpp"
|
||||||
|
|
||||||
#include <px4_platform_common/module_params.h>
|
#include <px4_platform_common/module_params.h>
|
||||||
#include <lib/slew_rate/SlewRate.hpp>
|
#include <lib/slew_rate/SlewRate.hpp>
|
||||||
+1
-1
@@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "ActuatorEffectiveness.hpp"
|
#include "actuator_effectiveness/ActuatorEffectiveness.hpp"
|
||||||
#include "ActuatorEffectivenessRotors.hpp"
|
#include "ActuatorEffectivenessRotors.hpp"
|
||||||
#include "ActuatorEffectivenessControlSurfaces.hpp"
|
#include "ActuatorEffectivenessControlSurfaces.hpp"
|
||||||
|
|
||||||
+1
-1
@@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "ActuatorEffectiveness.hpp"
|
#include "actuator_effectiveness/ActuatorEffectiveness.hpp"
|
||||||
#include "ActuatorEffectivenessRotors.hpp"
|
#include "ActuatorEffectivenessRotors.hpp"
|
||||||
#include "ActuatorEffectivenessControlSurfaces.hpp"
|
#include "ActuatorEffectivenessControlSurfaces.hpp"
|
||||||
|
|
||||||
+1
-1
@@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "ActuatorEffectiveness.hpp"
|
#include "actuator_effectiveness/ActuatorEffectiveness.hpp"
|
||||||
|
|
||||||
#include <px4_platform_common/module_params.h>
|
#include <px4_platform_common/module_params.h>
|
||||||
|
|
||||||
+1
-1
@@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "ActuatorEffectiveness.hpp"
|
#include "actuator_effectiveness/ActuatorEffectiveness.hpp"
|
||||||
|
|
||||||
#include <px4_platform_common/module_params.h>
|
#include <px4_platform_common/module_params.h>
|
||||||
|
|
||||||
+1
-1
@@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "ActuatorEffectiveness.hpp"
|
#include "actuator_effectiveness/ActuatorEffectiveness.hpp"
|
||||||
#include "ActuatorEffectivenessRotors.hpp"
|
#include "ActuatorEffectivenessRotors.hpp"
|
||||||
#include "ActuatorEffectivenessTilts.hpp"
|
#include "ActuatorEffectivenessTilts.hpp"
|
||||||
|
|
||||||
+1
-1
@@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "ActuatorEffectiveness.hpp"
|
#include "actuator_effectiveness/ActuatorEffectiveness.hpp"
|
||||||
#include "ActuatorEffectivenessRotors.hpp"
|
#include "ActuatorEffectivenessRotors.hpp"
|
||||||
|
|
||||||
class ActuatorEffectivenessMultirotor : public ModuleParams, public ActuatorEffectiveness
|
class ActuatorEffectivenessMultirotor : public ModuleParams, public ActuatorEffectiveness
|
||||||
+1
-1
@@ -41,7 +41,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "ActuatorEffectiveness.hpp"
|
#include "actuator_effectiveness/ActuatorEffectiveness.hpp"
|
||||||
|
|
||||||
#include <px4_platform_common/module_params.h>
|
#include <px4_platform_common/module_params.h>
|
||||||
#include <uORB/Subscription.hpp>
|
#include <uORB/Subscription.hpp>
|
||||||
+1
-1
@@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "ActuatorEffectiveness.hpp"
|
#include "actuator_effectiveness/ActuatorEffectiveness.hpp"
|
||||||
|
|
||||||
class ActuatorEffectivenessRoverAckermann : public ActuatorEffectiveness
|
class ActuatorEffectivenessRoverAckermann : public ActuatorEffectiveness
|
||||||
{
|
{
|
||||||
+1
-1
@@ -41,7 +41,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "ActuatorEffectiveness.hpp"
|
#include "actuator_effectiveness/ActuatorEffectiveness.hpp"
|
||||||
#include "ActuatorEffectivenessRotors.hpp"
|
#include "ActuatorEffectivenessRotors.hpp"
|
||||||
#include "ActuatorEffectivenessControlSurfaces.hpp"
|
#include "ActuatorEffectivenessControlSurfaces.hpp"
|
||||||
|
|
||||||
+1
-1
@@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "ActuatorEffectiveness.hpp"
|
#include "actuator_effectiveness/ActuatorEffectiveness.hpp"
|
||||||
#include "ActuatorEffectivenessRotors.hpp"
|
#include "ActuatorEffectivenessRotors.hpp"
|
||||||
#include "ActuatorEffectivenessControlSurfaces.hpp"
|
#include "ActuatorEffectivenessControlSurfaces.hpp"
|
||||||
|
|
||||||
+1
-1
@@ -41,7 +41,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "ActuatorEffectiveness.hpp"
|
#include "actuator_effectiveness/ActuatorEffectiveness.hpp"
|
||||||
#include "ActuatorEffectivenessRotors.hpp"
|
#include "ActuatorEffectivenessRotors.hpp"
|
||||||
#include "ActuatorEffectivenessControlSurfaces.hpp"
|
#include "ActuatorEffectivenessControlSurfaces.hpp"
|
||||||
#include "ActuatorEffectivenessTilts.hpp"
|
#include "ActuatorEffectivenessTilts.hpp"
|
||||||
+1
-1
@@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "ActuatorEffectiveness.hpp"
|
#include "actuator_effectiveness/ActuatorEffectiveness.hpp"
|
||||||
#include "ActuatorEffectivenessRotors.hpp"
|
#include "ActuatorEffectivenessRotors.hpp"
|
||||||
|
|
||||||
#include <px4_platform_common/module_params.h>
|
#include <px4_platform_common/module_params.h>
|
||||||
+1
-1
@@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "ActuatorEffectiveness.hpp"
|
#include "actuator_effectiveness/ActuatorEffectiveness.hpp"
|
||||||
#include "ActuatorEffectivenessRotors.hpp"
|
#include "ActuatorEffectivenessRotors.hpp"
|
||||||
|
|
||||||
class ActuatorEffectivenessUUV : public ModuleParams, public ActuatorEffectiveness
|
class ActuatorEffectivenessUUV : public ModuleParams, public ActuatorEffectiveness
|
||||||
@@ -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)
|
||||||
Reference in New Issue
Block a user