Browse Source

change mpccontroller.pro.

yuchuli 1 year ago
parent
commit
983dd42d58

+ 47 - 4
src/decition/mpccontroller/mpccontroller.pro

@@ -1,23 +1,66 @@
-CONFIG -= qt
+
+QT       += core
 
 TEMPLATE = lib
 DEFINES += MPCCONTROLLER_LIBRARY
 
 CONFIG += c++17
+CONFIG += plugin
 
 # You can make your code fail to compile if it uses deprecated APIs.
 # In order to do so, uncomment the following line.
 #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
 
 SOURCES += \
-    mpccontroller.cpp
+        csc_matrix_conv.cpp \
+        lowpass_filter.cpp \
+        mpc.cpp \
+        mpc_trajectory.cpp \
+        mpc_utils.cpp \
+        osqp_interface.cpp \
+        qp_solver/qp_solver_osqp.cpp \
+        qp_solver/qp_solver_unconstraint_fast.cpp \
+        steering_offset/steering_offset.cpp \
+        steering_predictor.cpp \
+        vehicle_info.cpp \
+        vehicle_info_util.cpp \
+        vehicle_model/vehicle_model_bicycle_dynamics.cpp \
+        vehicle_model/vehicle_model_bicycle_kinematics.cpp \
+        vehicle_model/vehicle_model_bicycle_kinematics_no_delay.cpp \
+        vehicle_model/vehicle_model_interface.cpp
 
 HEADERS += \
-    mpccontroller_global.h \
-    mpccontroller.h
+            mpc_lateral_controller/lowpass_filter.hpp \
+            mpc_lateral_controller/mpc.hpp \
+            mpc_lateral_controller/mpc_trajectory.hpp \
+            mpc_lateral_controller/mpc_utils.hpp \
+            mpc_lateral_controller/qp_solver/qp_solver_interface.hpp \
+            mpc_lateral_controller/qp_solver/qp_solver_osqp.hpp \
+            mpc_lateral_controller/qp_solver/qp_solver_unconstraint_fast.hpp \
+            mpc_lateral_controller/steering_offset/steering_offset.hpp \
+            mpc_lateral_controller/steering_predictor.hpp \
+            mpc_lateral_controller/vehicle_model/vehicle_model_bicycle_dynamics.hpp \
+            mpc_lateral_controller/vehicle_model/vehicle_model_bicycle_kinematics.hpp \
+            mpc_lateral_controller/vehicle_model/vehicle_model_bicycle_kinematics_no_delay.hpp \
+            mpc_lateral_controller/vehicle_model/vehicle_model_interface.hpp \
+            vehicle_info_util/vehicle_info.hpp \
+            vehicle_info_util/vehicle_info_util.hpp
 
 # Default rules for deployment.
 unix {
     target.path = /usr/lib
 }
 !isEmpty(target.path): INSTALLS += target
+
+
+unix:INCLUDEPATH += /usr/include/eigen3
+win32:INCLUDEPATH += D:\File\soft\eigen
+
+LIBS += -linterpolation -losqp
+
+
+INCLUDEPATH += $$PWD/../../common/include
+
+!include(../../../include/common.pri ) {
+    error( "Couldn't find the common.pri file!" )
+}

+ 1 - 3
src/decition/mpccontroller/testmpc.pro

@@ -35,7 +35,6 @@ else: unix:!android: target.path = /opt/$${TARGET}/bin
 unix:INCLUDEPATH += /usr/include/eigen3
 win32:INCLUDEPATH += D:\File\soft\eigen
 
-INCLUDEPATH += /opt/ros/humble/include
 
 HEADERS += \
     mpc_lateral_controller/lowpass_filter.hpp \
@@ -61,5 +60,4 @@ INCLUDEPATH += $$PWD/../../common/include
     error( "Couldn't find the common.pri file!" )
 }
 
-LIBS += -linterpolation
-LIBS += -L/opt/ros/humble/lib -losqp
+LIBS += -linterpolation -losqp