Skip to content

Commit

Permalink
Separate vehicle specific actuator effectiveness
Browse files Browse the repository at this point in the history
Keep actuator effectivenss in control allocator
  • Loading branch information
Jaeyoung-Lim committed Jan 10, 2025
1 parent a164aa7 commit dac5ae0
Show file tree
Hide file tree
Showing 33 changed files with 57 additions and 45 deletions.
31 changes: 0 additions & 31 deletions src/lib/actuator_effectiveness/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand All @@ -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)
2 changes: 2 additions & 0 deletions src/modules/control_allocator/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
############################################################################

include_directories(${CMAKE_CURRENT_SOURCE_DIR})
add_subdirectory(VehicleActuatorEffectiveness)

px4_add_module(
MODULE modules__control_allocator
Expand All @@ -48,6 +49,7 @@ px4_add_module(
DEPENDS
mathlib
ActuatorEffectiveness
VehicleActuatorEffectiveness
ControlAllocation
px4_work_queue
SlewRate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

#pragma once

#include "ActuatorEffectiveness.hpp"
#include "actuator_effectiveness/ActuatorEffectiveness.hpp"
#include "ActuatorEffectivenessRotors.hpp"
#include "ActuatorEffectivenessControlSurfaces.hpp"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

#pragma once

#include "ActuatorEffectiveness.hpp"
#include "actuator_effectiveness/ActuatorEffectiveness.hpp"
#include "ActuatorEffectivenessRotors.hpp"
#include "ActuatorEffectivenessControlSurfaces.hpp"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

#pragma once

#include "ActuatorEffectiveness.hpp"
#include "actuator_effectiveness/ActuatorEffectiveness.hpp"

#include <px4_platform_common/module_params.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

#pragma once

#include "ActuatorEffectiveness.hpp"
#include "actuator_effectiveness/ActuatorEffectiveness.hpp"

#include <px4_platform_common/module_params.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

#pragma once

#include "ActuatorEffectiveness.hpp"
#include "actuator_effectiveness/ActuatorEffectiveness.hpp"
#include "ActuatorEffectivenessRotors.hpp"
#include "ActuatorEffectivenessTilts.hpp"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

#pragma once

#include "ActuatorEffectiveness.hpp"
#include "actuator_effectiveness/ActuatorEffectiveness.hpp"
#include "ActuatorEffectivenessRotors.hpp"

class ActuatorEffectivenessMultirotor : public ModuleParams, public ActuatorEffectiveness
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

#pragma once

#include "ActuatorEffectiveness.hpp"
#include "actuator_effectiveness/ActuatorEffectiveness.hpp"

class ActuatorEffectivenessRoverAckermann : public ActuatorEffectiveness
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

#pragma once

#include "ActuatorEffectiveness.hpp"
#include "actuator_effectiveness/ActuatorEffectiveness.hpp"
#include "ActuatorEffectivenessRotors.hpp"
#include "ActuatorEffectivenessControlSurfaces.hpp"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

#pragma once

#include "ActuatorEffectiveness.hpp"
#include "actuator_effectiveness/ActuatorEffectiveness.hpp"
#include "ActuatorEffectivenessRotors.hpp"
#include "ActuatorEffectivenessControlSurfaces.hpp"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

#pragma once

#include "ActuatorEffectiveness.hpp"
#include "actuator_effectiveness/ActuatorEffectiveness.hpp"
#include "ActuatorEffectivenessRotors.hpp"
#include "ActuatorEffectivenessControlSurfaces.hpp"
#include "ActuatorEffectivenessTilts.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

#pragma once

#include "ActuatorEffectiveness.hpp"
#include "actuator_effectiveness/ActuatorEffectiveness.hpp"
#include "ActuatorEffectivenessRotors.hpp"

#include <px4_platform_common/module_params.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

#pragma once

#include "ActuatorEffectiveness.hpp"
#include "actuator_effectiveness/ActuatorEffectiveness.hpp"
#include "ActuatorEffectivenessRotors.hpp"

class ActuatorEffectivenessUUV : public ModuleParams, public ActuatorEffectiveness
Expand Down
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit dac5ae0

Please sign in to comment.