Преглед на файлове

change barin Point2d struct for xunluoche

fujiankuan преди 4 години
родител
ревизия
cb02686b48
променени са 53 файла, в които са добавени 138 реда и са изтрити 1048 реда
  1. 7 12
      autodeploy.sh
  2. 28 62
      autogen.sh
  3. 3 0
      build_partial.sh
  4. 3 6
      deploy.sh
  5. 5 1
      src/decition/common/common/common.pri
  6. 0 0
      src/decition/common/common/fusion.h
  7. 22 1
      src/decition/common/common/gps_type.h
  8. 2 1
      src/decition/common/common/sysparam_type.h
  9. 0 51
      src/decition/common/common_sf/boost.h
  10. 0 24
      src/decition/common/common_sf/car_status.cpp
  11. 0 188
      src/decition/common/common_sf/car_status.h
  12. 0 19
      src/decition/common/common_sf/common_sf.pri
  13. 0 43
      src/decition/common/common_sf/constants.h
  14. 0 131
      src/decition/common/common_sf/gps_type.h
  15. 0 18
      src/decition/common/common_sf/group_type.h
  16. 0 16
      src/decition/common/common_sf/hmi_type.h
  17. 0 84
      src/decition/common/common_sf/lidar.cpp
  18. 0 39
      src/decition/common/common_sf/lidar.h
  19. 0 136
      src/decition/common/common_sf/logout.h
  20. 0 69
      src/decition/common/common_sf/obstacle_type.h
  21. 0 18
      src/decition/common/common_sf/platform_type.h
  22. 0 24
      src/decition/common/common_sf/roadmode_type.h
  23. 0 33
      src/decition/common/common_sf/sysparam_type.h
  24. 0 19
      src/decition/common/common_sf/ultrasonic_type.h
  25. 2 2
      src/decition/common/perception_sf/sensor.h
  26. 2 2
      src/decition/common/perception_sf/sensor_gps.h
  27. 2 2
      src/decition/common/perception_sf/sensor_lidar.h
  28. 1 1
      src/decition/common/perception_sf/sensor_radar.h
  29. 1 1
      src/decition/decition_brain/decition/brain.cpp
  30. 8 1
      src/decition/decition_brain/decition/decide_gps_00.cpp
  31. 1 1
      src/decition/decition_brain/decition/decide_gps_00.h
  32. 2 2
      src/decition/decition_brain_sf/decition/adc_adapter/base_adapter.h
  33. 2 2
      src/decition/decition_brain_sf/decition/adc_adapter/bus_adapter.h
  34. 2 2
      src/decition/decition_brain_sf/decition/adc_adapter/ge3_adapter.h
  35. 2 2
      src/decition/decition_brain_sf/decition/adc_adapter/qingyuan_adapter.h
  36. 2 2
      src/decition/decition_brain_sf/decition/adc_adapter/vv7_adapter.h
  37. 2 2
      src/decition/decition_brain_sf/decition/adc_adapter/zhongche_adapter.h
  38. 2 2
      src/decition/decition_brain_sf/decition/adc_controller/base_controller.h
  39. 2 2
      src/decition/decition_brain_sf/decition/adc_controller/pid_controller.h
  40. 2 2
      src/decition/decition_brain_sf/decition/adc_planner/base_planner.h
  41. 2 2
      src/decition/decition_brain_sf/decition/adc_tools/compute_00.h
  42. 3 3
      src/decition/decition_brain_sf/decition/adc_tools/gnss_coordinate_convert.cpp
  43. 1 1
      src/decition/decition_brain_sf/decition/adc_tools/parameter_status.h
  44. 1 1
      src/decition/decition_brain_sf/decition/adc_tools/transfer.h
  45. 2 1
      src/decition/decition_brain_sf/decition/brain.cpp
  46. 5 5
      src/decition/decition_brain_sf/decition/brain.h
  47. 7 1
      src/decition/decition_brain_sf/decition/decide_gps_00.cpp
  48. 3 3
      src/decition/decition_brain_sf/decition/decide_gps_00.h
  49. 2 2
      src/decition/decition_brain_sf/decition/decide_line_00.h
  50. 1 1
      src/decition/decition_brain_sf/decition/decition_maker.h
  51. 1 1
      src/decition/decition_brain_sf/decition/decition_type.h
  52. 2 2
      src/decition/decition_brain_sf/decition/obs_predict.h
  53. 3 2
      src/decition/decition_brain_sf/decition_brain_sf.pro

+ 7 - 12
autodeploy.sh

@@ -1,5 +1,5 @@
 PRO_DIR=`pwd`
-CONFIG_IVSysMan="IVSysMan_Ge3.xml"
+CONFIG_IVSysMan="IVSysMan_midcar.xml"
 
 check_result=`whereis patchelf | awk '{print $2}'`
 if [ ! $check_result ];then
@@ -8,37 +8,33 @@ if [ ! $check_result ];then
 fi
 
 app_name=(
-#driver_lidar_rs16
-driver_lidar_vlp16
+driver_lidar_rs16
+#driver_lidar_vlp16
 driver_gps_hcp2
-driver_camera_miivii
-driver_cloud_grpc_client
-#driver_radio_p900
 driver_can_nvidia_agx
 #driver_can_kvaser
 #driver_can_vci
 driver_map_trace
-#driver_radio_p900
+driver_radio_p900
 detection_radar_delphi_esr
 detection_lidar_grid
-view_pointcloud
+#view_pointcloud
 view_gps
 view_rawcan
 view_radar
 IVSysMan
 ivmapmake
 view_ivlog
-#tool_querymsg
+tool_querymsg
 detection_chassis
 ui_ads_hmi
 decition_brain
 #decition_brain_ge3
-#controller_midcar
+controller_midcar
 driver_map_xodrload
 tool_xodrobj
 ivlog_record
 adciv_record
-picview
 )
 
 for x in ${app_name[@]}
@@ -47,7 +43,6 @@ do
 	cp ./bin/${x} ./
 	./deploy.sh $x
 	if [ $? == 1 ];then
-		echo "build $x faile"
 		echo "build $x faile"
 		exit 1
 	fi

+ 28 - 62
autogen.sh

@@ -25,37 +25,6 @@ check_result()
 	fi
 }
 
-function checkOS_TYPE(){
-    if [[ ! -z "`uname | grep Darwin`" ]];then
-        OS_TYPE=osx
-		install_path=/Applications
-    elif [[ ! -z "`uname | grep Linux`" ]];then
-        OS_TYPE=linux
-		install_path=/usr/lib
-    else
-        echo "Unsupported operating systems!"
-        exit 1
-    fi
-    echo "The current operating system is"
-    echo $OS_TYPE
-}
-
-function checkos(){
-    if [[ -f /etc/redhat-release ]];then
-        OS=Centos
-    elif [[ ! -z "`cat /etc/issue | grep bian`" ]];then
-        OS=Debian
-    elif [[ ! -z "`cat /etc/issue | grep Ubuntu`" ]];then
-        OS=Ubuntu
-    else
-        echo "Unknow!!!"
-    fi
-	echo $OS
-}
-
-checkOS_TYPE
-checkos
-
 MAKEOPT=-j8
 
 mkdir bin
@@ -66,6 +35,7 @@ cd ../../../
 
 cd src/common/modulecomm/
 $qtmake modulecomm.pro
+check_result $?
 make $MAKEOPT
 check_result $?
 make clean
@@ -84,15 +54,25 @@ rm Makefile
 rm .qmake.stash
 cd ../../../
 
-#cd src/common/ndt_cpu/
-#$qtmake ndt_cpu.pro
-#make $MAKEOPT
-#check_result $?
-#make clean
-#cp libndt_cpu.so ./../../../bin/
-#rm Makefile
-#rm .qmake.stash
-#cd ../../../
+cd src/common/ndt_cpu/
+$qtmake ndt_cpu.pro
+make $MAKEOPT
+check_result $?
+make clean
+cp libndt_cpu.so ./../../../bin/
+rm Makefile
+rm .qmake.stash
+cd ../../../
+
+cd src/common/ivlog/
+$qtmake ivlog.pro
+make $MAKEOPT
+check_result $?
+make clean
+cp libivlog.so ./../../../bin/
+rm Makefile
+rm .qmake.stash
+cd ../../../
 
 cd src/common/ivfault/
 $qtmake ivfault.pro
@@ -134,20 +114,10 @@ rm Makefile
 rm .qmake.stash
 cd ../../../
 
-cd src/common/ivlog/
-$qtmake ivlog.pro
-make $MAKEOPT
-check_result $?
-make clean
-cp libivlog.so ./../../../bin/
-rm Makefile
-rm .qmake.stash
-cd ../../../
-
 controller_app_name=(
-#	controller_ge3
+	controller_ge3
 	controller_vv7
-#    controller_midcar
+    controller_midcar
 )
 
 for x in ${controller_app_name[@]}
@@ -186,19 +156,16 @@ do
 done
 
 driver_app_name=(
-#	driver_lidar_rs16
-	driver_lidar_vlp16
+	driver_lidar_rs16
+#	driver_lidar_vlp16
 	driver_gps_hcp2
 	#driver_gps_ins550d
 	driver_can_nvidia_agx
 #	driver_can_kvaser
-#	driver_radio_p900
 #	driver_can_vci
 	driver_map_trace
 	driver_map_xodrload
-#   driver_radio_p900
-	driver_camera_miivii
-	driver_cloud_grpc_client
+    driver_radio_p900
 )
 
 for x in ${driver_app_name[@]}
@@ -237,18 +204,17 @@ do
 done
 
 tool_app_name=(
-	view_pointcloud
+	#view_pointcloud
 	view_gps
 	view_rawcan
 	view_radar
 	IVSysMan
 	ivmapmake
 	view_ivlog
-#	tool_querymsg
+	tool_querymsg
 	tool_xodrobj
 	ivlog_record
-	adciv_record	
-	picview
+	adciv_record
 )
 
 for x in ${tool_app_name[@]}

+ 3 - 0
build_partial.sh

@@ -1,7 +1,10 @@
 #!/bin/bash
 
+<<<<<<< Updated upstream
 #qtmake="/opt/Qt5.10.1/5.10.1/gcc_64/bin/qmake"
 #qtmake=/usr/bin/qmake
+=======
+>>>>>>> Stashed changes
 qtmake="/usr/lib/aarch64-linux-gnu/qt5/bin/qmake"
 
 check_result()

+ 3 - 6
deploy.sh

@@ -2,8 +2,8 @@
 
 #Qtgccdir=''
 Qtgccdir='/usr/lib/aarch64-linux-gnu/qt5'
-#QtLibDir=/usr/lib/aarch64-linux-gnu/
-
+QtPlatformdir=$Qtgccdir/plugins/platforms
+QtLibDir=/usr/lib/aarch64-linux-gnu/
 
 if [ ${#Qtgccdir} -lt 6 ]; then
   echo "Because not set gcc_64 , so auto find gcc_64 "
@@ -39,9 +39,6 @@ if [ "$#" -lt 1 ]; then
 	exit
 fi
 
-QtPlatformdir=$Qtgccdir/plugins/platforms
-QtLibDir=$Qtgccdir/lib
-
 ignore_lib_name=(
 libstdc++.so.*
 libm.so.*
@@ -116,7 +113,7 @@ cd platforms
 patchelf --set-rpath '$ORIGIN/../lib/' libqxcb.so
 if [ "$?" != 0 ];then
 	echo -e "\e[31m deploy.sh: patchelf $EXE faile, Ensure patchelf tool installed\e[0m"
-#	exit 1
+	exit 1
 fi
 cd ..
 cd ..

+ 5 - 1
src/decition/common/common/common.pri

@@ -11,7 +11,11 @@ HEADERS += \
     $$PWD/ultrasonic_type.h \
     $$PWD/hmi_type.h \
     $$PWD/platform_type.h \
-    $$PWD/group_type.h
+    $$PWD/group_type.h \
+    $$PWD/fusion.h \
+    $$PWD/gps_type.h \
+    $$PWD/roadmode_type.h \
+    $$PWD/sysparam_type.h
 
 SOURCES += \
     $$PWD/car_status.cpp \

+ 0 - 0
src/decition/common/common_sf/fusion.h → src/decition/common/common/fusion.h


+ 22 - 1
src/decition/common/common/gps_type.h

@@ -77,9 +77,11 @@ namespace iv {
      class Point2D
     {
       public:
-          double x = 0, y = 0, speed=0;
+         double x = 0, y = 0, speed=0,obs_speed_x=0,obs_speed_y=0;
          int v1 = 0, v2 = 0;
          int roadMode = 0;
+         int obs_type=0;
+
 
          Point2D()
         {
@@ -94,6 +96,25 @@ namespace iv {
 
      };
 
+     class TracePoint
+         {
+       public:
+               double x = 0, y = 0, speed=0;
+              int v1 = 0, v2 = 0;
+              int roadMode = 0;
+
+              TracePoint()
+             {
+                 x = y = v1 = 0;
+             }
+
+              TracePoint(double _x, double _y)
+             {
+                 x = _x; y = _y;
+             }
+
+     };
+
 
      class TrafficLight
     {

+ 2 - 1
src/decition/common/common/sysparam_type.h

@@ -7,9 +7,10 @@ namespace iv {
     struct sysparam
     {
 
+
         std::string mstrvin;
         std::string mstriccid;
-        std::string mstrid;
+        std::string mstrid = "1";
         std::string mstrepsoff;
         std::string mvehtype;
         std::string mgroup;

+ 0 - 51
src/decition/common/common_sf/boost.h

@@ -1,51 +0,0 @@
-#pragma once
-
-#ifndef _IV_BOOST_H_
-#define _IV_BOOST_H_
-
-#if defined __GNUC__
-#  pragma GCC system_header 
-#endif
-#ifndef __CUDACC__
-//https://bugreports.qt-project.org/browse/QTBUG-22829
-#ifndef Q_MOC_RUN
-#include <boost/version.hpp>
-#include <boost/numeric/conversion/cast.hpp>
-#include <boost/thread/mutex.hpp>
-#include <boost/thread/condition.hpp>
-#include <boost/thread.hpp>
-#include <boost/thread/thread.hpp>
-#include <boost/filesystem.hpp>
-#include <boost/bind.hpp>
-#include <boost/cstdint.hpp>
-#include <boost/function.hpp>
-#include <boost/tuple/tuple.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/weak_ptr.hpp>
-#include <boost/mpl/fold.hpp>
-#include <boost/mpl/inherit.hpp>
-#include <boost/mpl/inherit_linearly.hpp>
-#include <boost/mpl/joint_view.hpp>
-#include <boost/mpl/transform.hpp>
-#include <boost/mpl/vector.hpp>
-#include <boost/algorithm/string.hpp>
-#ifndef Q_MOC_RUN
-#include <boost/date_time/posix_time/posix_time.hpp>
-#endif
-#if BOOST_VERSION >= 104700
-#include <boost/chrono.hpp>
-#endif
-#include <boost/tokenizer.hpp>
-#include <boost/foreach.hpp>
-#include <boost/shared_array.hpp>
-#include <boost/interprocess/sync/file_lock.hpp>
-#if BOOST_VERSION >= 104900
-#include <boost/interprocess/permissions.hpp>
-#endif
-#include <boost/iostreams/device/mapped_file.hpp>
-#define BOOST_PARAMETER_MAX_ARITY 7
-#include <boost/signals2.hpp>
-#include <boost/signals2/slot.hpp>
-#endif
-#endif
-#endif    // _IV_BOOST_H_

+ 0 - 24
src/decition/common/common_sf/car_status.cpp

@@ -1,24 +0,0 @@
-#include "car_status.h"
-
-#ifdef linux
-
-unsigned long GetTickCount()
-{
- struct timespec ts;
- clock_gettime(CLOCK_MONOTONIC,&ts);
- return (ts.tv_sec * 1000 + ts.tv_nsec/(1000*1000) );
-}
-#endif
-
-iv::CarStatus::CarStatus()
-{
-	speed = 0;
-	braking_pressure = 0;
-	wheel_angle = 0;
-	location = boost::shared_ptr<iv::GPS_INS>(new iv::GPS_INS);
-    mRunTime.start();
-}
-
-iv::CarStatus::~CarStatus()
-{
-}

+ 0 - 188
src/decition/common/common_sf/car_status.h

@@ -1,188 +0,0 @@
-#pragma once
-#ifndef _IV_COMMON_CAR_STATUS_
-#define _IV_COMMON_CAR_STATUS_
-
-#include <common/boost.h>
-#include <boost/serialization/singleton.hpp>
-#include <common/gps_type.h>
-#include <common/obstacle_type.h>
-#include <time.h>
-#include <control/mobileye.h>
-#include <QTime>
-
-///kkcai, 2020-01-03
-#include <QMutex>
-///////////////////////////////////////
-
-#include "platform/platform.h"
-
-#include "ultrasonic_type.h"
-
-//#include "common/decitionview.pb.h"
-
-#include "common/sysparam_type.h"
-
-#include "common/roadmode_type.h"
-
-#define RADAR_OBJ_NUM 64
-
-#ifdef linux
-unsigned long GetTickCount();
-#endif
-namespace iv {
-    class CarStatus : public boost::noncopyable {
-    public:
-        CarStatus();
-        ~CarStatus();
-
-        float speed;			//车速
-        double mfCalAcc = 0;
-        std::int16_t wheel_angle;		//方向盘转角
-        std::uint8_t braking_pressure;	//刹车压力
-         float torque_st=0;
-        bool mbRunPause = true;
-        bool mbBrainCtring = false;
-        bool status[6] = { true, false, false, false, true, false };	//bool arrive = false;	//  x4:是否到达站点(0:未到 1:到达)
-                                                                //bool people = false;	//	x3:车上是否有人(0:无人 1:有人)
-                                                                //bool stop = false;	    //	x2:是否停车(0:否   1:是)
-                                                                //bool call = false;		//	x1:是否叫车(0:否	1:是)
-                                                                //bool available = true;	// 是否可被叫车
-                                                                //bool fire = false;
- //       int carState = 0;	// 0:停车	1:正常循迹	2:前往站点
-
-        int carState = 0;	// 0:停车	1:正常循迹	2:前往站点
-                int istostation = 0;
-                //int ctostation = 0;
-                int currentstation = 0;
-                //int nextstation = 0;
-                int clientto = 0;
-                double amilng = 0.0;
-                double amilat = 0.0;
-                bool busmode = false;
-                bool netconnect = false;
-                bool doorsta=false;
-                unsigned char speedlimte;
-
-        int grade=0;
-        int driverMode=0;
-        int epb=0;
-        int epsMode=1;
-        bool receiveEps=false;
-
-
-              bool speed_control=true;
-              bool group_control =false;
-              int group_server_status=0;
-              int  group_state = 0;
-              float group_x_local = 0.0;
-              float group_y_local = 0.0;
-              float group_velx_local = 0.0;
-              float group_vely_local = 0.0;
-              float group_comm_speed = 0.0;
-              int group_pathpoint=0;
-              float group_offsetx=0.0;
-              float group_frontDistance=0.0;
-
-              float mfttc = 0;
-
-
-        std::vector <iv::platform::station> car_stations;
-
-
-        AWS_display aws_display;
-        lane Lane;
-        obstacle_status obstacleStatus;
-        obstacle_data_a obstacleStatusA[15];
-        obstacle_data_b obstacleStatusB[15];
-        obstacle_data_c obstacleStatusC[15];
-        aftermarket_lane aftermarketLane;
-        lka_left_lane_a LKAleftLaneA;
-        lka_left_lane_b LKAleftLaneB;
-        lka_right_lane_a LKArightLaneA;
-        lka_right_lane_b LKArightLaneB;
-        next_lane_a nextLaneA_left[4], nextLaneA_right[4];
-        next_lane_b nextLaneB_left[4], nextLaneB_right[4];
-        ref_points refPoints;
-        num_of_next_lane_mark_reported numOfNextLaneMarkReported;
-
-
-        double mfAcc = 0;
-        double mfVehAcc=0;
-        double mfWheel = 0;
-        double mfBrake = 0;
-        double steerAngle=0;
-        QTime mRunTime;
-
-        int mRadarS = -1;
-        int mLidarS = -1;
-        int mRTKStatus = 0;
-        int mLidarPer = -1;
-
-        double mLidarObs;
-        double mRadarObs;
-        double mObs;
-
-
-        GPS_INS aim_gps_ins;
-        bool bocheMode=false;
-        int bocheEnable=0;
-
-        double mfParkLat;
-        double mfParkLng;
-        double mfParkHeading;
-        int mnParkType;
-
-
-        double mLidarRotation;
-        double mLidarRangeUnit;
-
-        iv::GPSData location;		//当前车辆位置
-        boost::array<iv::ObstacleBasic, 64> obs_radar;//毫米波雷达的障碍物数据
-         boost::array<iv::ObstacleBasic, 64> obs_rear_radar;//houxiang毫米波雷达的障碍物数据
-        iv::ultrasonic_obs multrasonic_obs;
-        double mfGPSAcc = 0;
-
-//        iv::brain::decitionview mdecitionview;
-        iv::sysparam msysparam;
-        iv::roadmode_vel mroadmode_vel;
-        int vehGroupId;
-        double mfEPSOff = 0.0;
-        float socfDis=15;   //停障触发距离
-        float aocfDis=25;   //避障触发距离
-        float aocfTimes=5; //避障触发次数
-        float aobzDis=5;   //避障保障距离
-        /// traffice light : 0x90
-        int iTrafficeLightID = 0;       //红绿灯ID
-        int iTrafficeLightColor = 2;    //0x0: 红色
-        //0x1: 黄色
-        //0x2: 绿色
-        int iTrafficeLightTime = 0;     //红绿灯剩余时间
-        double iTrafficeLightLat = 0;
-        double iTrafficeLightLon = 0;
-
-        bool daocheMode=false;
-
-        //////////////////////////////////////////////////////
-
-        ///kkcai, 2020-01-03
-        QMutex mMutexMap;
-        /////////////////////////////////////
-
-        //mobileEye chuku
-
-        float vehSpeed_st=0;
-
-        bool useMobileEye = false;
-        bool m_bOutGarage=false;//车道线识别出库标志
-        float outGarageLong=10;
-        float waitGpsTimeWidth=5000;
-
-        int mnBocheComplete = 0;   //When boche comple set a value.
-
-        bool useObsPredict = false;
-
-    };
-    typedef boost::serialization::singleton<iv::CarStatus> CarStatusSingleton;//非线程安全,注意多线程加锁,单例模式
-}
-#define ServiceCarStatus iv::CarStatusSingleton::get_mutable_instance()
-#endif // !_IV_COMMON_CAR_STATUS_

+ 0 - 19
src/decition/common/common_sf/common_sf.pri

@@ -1,19 +0,0 @@
-DISTFILES +=
-
-HEADERS += \
-    $$PWD/boost.h \
-    $$PWD/car_status.h \
-    $$PWD/constants.h \
-    $$PWD/fusion.h \
-    $$PWD/gps_type.h \
-    $$PWD/lidar.h \
-    $$PWD/logout.h \
-    $$PWD/obstacle_type.h \
-    $$PWD/ultrasonic_type.h \
-    $$PWD/hmi_type.h \
-    $$PWD/platform_type.h \
-    $$PWD/group_type.h
-
-SOURCES += \
-    $$PWD/car_status.cpp \
-    $$PWD/lidar.cpp

+ 0 - 43
src/decition/common/common_sf/constants.h

@@ -1,43 +0,0 @@
-#pragma once
-#ifndef _IV_COMMON_CONSTANTS_
-#define _IV_COMMON_CONSTANTS_
-
-#include <common/car_status.h>
-namespace iv {
-
-
-    const std::uint8_t SPEED_MAX = 30;						//车速上限
-    const std::uint8_t BRAKING_PRESSURE_PERCENT_MAX = 50;	//刹车压力上限
-    const std::uint8_t ACCELERATE_PERCENT_MAX = 1;			//油门开合度上限
-
-    const std::uint8_t CONTROL_SPEED_TOLERANCE = 5;		//控制车速时容忍误差范围
-    const std::uint8_t CONTROL_WHEEL_ANGLE_TOLERANCE = 5;	//控制方向盘时容忍误差范围
-
-    const std::uint16_t WHEEL_ZERO = 0x1F4A;
-    //static iv::CarStatus CarStatus_(new iv::CarStatusBasic);
-
-    const float SPEED_RATIO = 0.08;		//实际车速和can中读出的车速比率
-
-    const float Veh_Width = 2.1;		//车宽
-    const float Veh_Lenth = 4.6;
-    const float Esr_Offset = 0;		//ESR偏移量
-    const float Esr_Y_Offset = 2.5;  //ESR纵向偏移量
-
-    const std::uint8_t THREAD_EXECUTECONTROL_MAXNUM = 1;	//decition_executer 执行线程最大数量
-
-
-    const double MaxValue = 1.7976931348623157E+308;  //     Represents the largest possible value of a System.Double. This field is constant.
-
-
-    const double MinValue = -1.7976931348623157E+308; //     Represents the smallest possible value of a System.Double. This field is constant.
-
-
-
-
-
-
-}
-
-
-
-#endif // !_IV_COMMON_CONSTANTS_

+ 0 - 131
src/decition/common/common_sf/gps_type.h

@@ -1,131 +0,0 @@
-#pragma once
-/*
-*GPS 惯导数据
-*/
-#ifndef _IV_COMMON_GPS_TYPE_
-#define _IV_COMMON_GPS_TYPE_
-
-#include <common/boost.h>
-namespace iv {
-    struct GPS_INS
-    {
-        int valid = 0xff;
-        int index = 0;	//gps点序号
-
-        double gps_lat = 0;//纬度
-        double gps_lng = 0;//经度
-
-        double gps_x = 0;
-        double gps_y = 0;
-        double gps_z = 0;
-
-        double ins_roll_angle = 0;	//横滚角 一般定义载体的右、前、上三个方向构成右手系,绕向前的轴旋转就是横滚角,绕向右的轴旋转就是俯仰角,绕向上的轴旋转就是航向角
-        double ins_pitch_angle = 0;	//俯仰角
-        double ins_heading_angle = 0;	//航向角
-
-        int ins_status = 0;	//惯导状态 4
-        int rtk_status = 0;	//rtk状态 6 -5 -3
-        int gps_satelites_num = 0;
-
-        //-----加速度--------------
-        double accel_x = 0;
-        double accel_y = 0;
-        double accel_z = 0;
-
-        //-------角速度------------
-        double ang_rate_x = 0;
-        double ang_rate_y = 0;
-        double ang_rate_z = 0;
-
-        //-----------方向速度--------------
-        double vel_N = 0;
-        double vel_E = 0;
-        double vel_D = 0;
-
-        int speed_mode = 0;
-        int mode2 = 0;
-        double speed = 0;			//速度  若导航点则为导航预设速度  若为当前点则为当前车速
-
-        int roadMode;
-        int runMode;
-        int roadSum;
-        int roadOri;
-
-    double mfLaneWidth = 3.5; // Current Lane Width
-
-    double mfDisToLaneLeft = 1.8; //Distance to Lane Left
-    int mnLaneChangeMark = 0; //1 to Left 0 not change   -1 to right
-    double mfDisToRoadLeft = 1.8; //Distance to Road Left
-    double mfRoadWidth = 3.5; // Road Width
-
-
-
-    };
-
-//    typedef std::shared_ptr<iv::GPS_INS> GPSData;
-    typedef boost::shared_ptr<iv::GPS_INS> GPSData;
-     class Point2D
-    {
-      public:
-          double x = 0, y = 0, speed=0,obs_speed_x=0,obs_speed_y=0;
-         int v1 = 0, v2 = 0;
-         int roadMode = 0;
-         int obs_type=0;
-
-         Point2D()
-        {
-            x = y = v1 = 0;
-        }
-
-         Point2D(double _x, double _y)
-        {
-            x = _x; y = _y;
-        }
-
-
-     };
-
-
-     class TrafficLight
-    {
-      public:
-         int leftColor = 0, rightColor = 0, straightColor=0, uturnColor=0;
-         int leftTime=0, rightTime=0 ,straightTime=0, uturnTime=0;
-
-         TrafficLight()
-        {
-            leftColor = 0, rightColor = 0, straightColor=0, uturnColor=0;
-            leftTime=0, rightTime=0 ,straightTime=0, uturnTime=0;
-        }
-
-     };
-     class StationCmd
-     {
-     public:
-         bool received;
-         uint32_t carID,carMode,emergencyStop,stationStop;
-         bool has_carID,has_carMode,has_emergencyStop,has_stationStop,mode_manual_drive;
-         uint32_t stationID[20];
-         GPS_INS  stationGps[20];
-         uint32_t stationTotalNum;
-         StationCmd()
-         {
-             received=false;
-             has_carID=false;
-             has_carMode=false;
-             has_emergencyStop=false;
-             has_stationStop=false;
-             mode_manual_drive=false;
-             carID=0;
-             carMode=0;
-             emergencyStop=0;
-             stationStop=0;
-             stationTotalNum=0;
-         }
-     };
-
-
-
-
-}
-#endif // !_IV_COMMON_GPS_TYPE_

+ 0 - 18
src/decition/common/common_sf/group_type.h

@@ -1,18 +0,0 @@
-#ifndef GROUP_TYPE_H
-#define GROUP_TYPE_H
-
-
-namespace iv {
-    namespace group{
-        struct GroupMsg
-        {
-            int car_id=0;
-            float command_speed=0;
-            float veh_state=0;
-
-        };
-    }
-}
-
-
-#endif // GROUP_TYPE_H

+ 0 - 16
src/decition/common/common_sf/hmi_type.h

@@ -1,16 +0,0 @@
-#ifndef HMI_TYPE_H
-#define HMI_TYPE_H
-
-#include <common/boost.h>
-namespace iv {
-    namespace hmi {
-        struct HMIBasic {
-            bool mbPause = false;
-            bool mbBocheMode = false;
-            bool mbbusmode = false;
-        };
-        typedef boost::shared_ptr<HMIBasic> Decition;	//决策
-    }
-}
-
-#endif // HMI_TYPE_H

+ 0 - 84
src/decition/common/common_sf/lidar.cpp

@@ -1,84 +0,0 @@
-#include "lidar.h"
-
-iv::Lidar::Lidar()
-{
-	Lidar_Grid = boost::shared_ptr<std::vector<iv::ObstacleBasic>>(new std::vector<iv::ObstacleBasic>);
-    Lidar_ = boost::shared_ptr<std::vector<iv::ObstacleBasic>>(new std::vector<iv::ObstacleBasic>);
-
-    std::shared_ptr<std::vector<iv::Perception::PerceptionOutput>> pertem(new std::vector<iv::Perception::PerceptionOutput>);
-    mper = pertem;
-}
-
-iv::Lidar::~Lidar()
-{
-}
-
-void iv::Lidar::copyfromlidar(iv::ObsLiDAR& obs)
-{
-    is_run = true;
-    if(mtx1.try_lock() == true)
-    {
-        Lidar_->clear();
-        Lidar_.swap(obs);
-        genggai1 = true;
-        mtx1.unlock();
-    }
-}
-void iv::Lidar::copylidarto(iv::ObsLiDAR& obs)
-{
-	if (genggai1 == true)
-	{
-        mtx1.lock();
-        obs->clear();
-        Lidar_.swap(obs);
-		genggai1 = false;
-		mtx1.unlock();
-	}
-}
-
-void iv::Lidar::copyfromlidarobs(iv::ObsLiDAR& obs)
-{
-    if(mtx2.try_lock() == true)
-    {
-        Lidar_Grid->clear();
-        Lidar_Grid.swap(obs);
-        genggai2 = true;
-        mtx2.unlock();
-    }
-}
-void iv::Lidar::copylidarobsto(iv::ObsLiDAR& obs)
-{
-	if (genggai2 == true)
-	{
-		mtx2.lock();
-		obs->clear();
-		Lidar_Grid.swap(obs);
-		genggai2 = false;
-		mtx2.unlock();
-	}
-}
-
-void iv::Lidar::copyfromlidarper(std::shared_ptr<std::vector<iv::Perception::PerceptionOutput> > & per)
-{
-    mMutexper.lock();
-    mper.swap(per);
-    mMutexper.unlock();
-}
-
-void iv::Lidar::copylidarperto(std::shared_ptr<std::vector<iv::Perception::PerceptionOutput> > & per)
-{
- //   int nSize = mper->size();
-    mMutexper.lock();
-//    per.swap(mper);
-    mper.swap(per);
-    mMutexper.unlock();
-//    if(nSize > 0)qDebug("have per");
-}
-
-
-bool iv::Lidar::did_lidar_ok()
-{
-    bool temp = is_run;
-    is_run = false;
-    return temp;
-}

+ 0 - 39
src/decition/common/common_sf/lidar.h

@@ -1,39 +0,0 @@
-#pragma once
-#ifndef _IV_COMMON_LIDAR_
-#define _IV_COMMON_LIDAR_
-
-#include <common/boost.h>
-#include <boost/serialization/singleton.hpp>
-#include <common/obstacle_type.h>
-#include <common/car_status.h>
-
-#include <QMutex>
-
-#include "perception/perceptionoutput.h"
-
-namespace iv {
-	class Lidar : public boost::noncopyable {
-	public:
-		Lidar();
-		~Lidar();
-		bool genggai1 = false, genggai2 = false;
-        bool is_run = false;
-		boost::mutex mtx1, mtx2;
-		iv::ObsLiDAR Lidar_Grid;
-        iv::ObsLiDAR Lidar_;
-        QMutex mMutexper;
-        std::shared_ptr<std::vector<iv::Perception::PerceptionOutput>> mper;
-
-        void copyfromlidar(iv::ObsLiDAR& obs);
-        void copylidarto(iv::ObsLiDAR& obs);
-		void copyfromlidarobs(iv::ObsLiDAR& obs);
-        void copylidarobsto(iv::ObsLiDAR& obs);
-
-        void copyfromlidarper(std::shared_ptr<std::vector<iv::Perception::PerceptionOutput>> & per);
-        void copylidarperto(std::shared_ptr<std::vector<iv::Perception::PerceptionOutput>> & per);
-        bool did_lidar_ok();
-	};
-	typedef boost::serialization::singleton<iv::Lidar> LidarSingleton;
-}
-#define ServiceLidar iv::LidarSingleton::get_mutable_instance()
-#endif // !_IV_COMMON_LIDAR_

+ 0 - 136
src/decition/common/common_sf/logout.h

@@ -1,136 +0,0 @@
-/**
-* 用于输出log文件的类.
-*/
-
-
-#ifndef LOG_H      
-#define LOG_H      
-
-
-//log文件路径    
-#define LOG_FILE_NAME "log_319.txt"    
-
-//启用开关    
-#define LOG_ENABLE    
-
-#include <fstream>      
-#include <string>      
-#include <ctime>
-//#include <Windows.h>
-//#include <tchar.h>
-/*
-using namespace std;
-
-class CLog
-{
-public:
-	static void GetLogFilePath(CHAR* szPath)
-	{
-		GetModuleFileNameA(NULL, szPath, MAX_PATH);
-		memset(strrchr(szPath, _T('\\')), NULL, strlen(strrchr(szPath, _T('\\'))) * sizeof(CHAR));
-		strcat(szPath, "\\");
-		strcat(szPath, LOG_FILE_NAME);
-	}
-	//输出一个内容,可以是字符串(ascii)、整数、浮点数、布尔、枚举    
-	//格式为:[2011-11-11 11:11:11] aaaaaaa并换行    
-	template <class T>
-	static void WriteLog(T x)
-	{
-		CHAR szPath[MAX_PATH] = { 0 };
-		GetLogFilePath(szPath);
-
-		ofstream fout(szPath, ios::app);
-		fout.seekp(ios::end);
-		fout << GetSystemTime() << x << endl;
-		fout.close();
-	}
-
-	//输出2个内容,以等号连接。一般用于前面是一个变量的描述字符串,后面接这个变量的值    
-	template<class T1, class T2>
-	static void WriteLog2(T1 x1, T2 x2)
-	{
-		CHAR szPath[MAX_PATH] = { 0 };
-		GetLogFilePath(szPath);
-		ofstream fout(szPath, ios::app);
-		fout.seekp(ios::end);
-		fout << GetSystemTime() << x1 << " = " << x2 << endl;
-		fout.close();
-	}
-
-	template<class T1, class T2, class T3, class T4, class T5, class T6 >
-	static void WriteLog6(T1 x1, T2 x2, T3 x3, T4 x4, T5 x5, T6 x6)
-	{
-		CHAR szPath[MAX_PATH] = { 0 };
-		GetLogFilePath(szPath);
-		ofstream fout(szPath, ios::app);
-		fout.seekp(ios::end);
-		fout << GetSystemTime() << x1 << "  " << x2 << "  "  
-								<< x3 << "  " << x4 << "  " 
-								<< x5 << "  " << x6 << endl;
-		fout.close();
-	}
-
-	//输出一行当前函数开始的标志,宏传入__FUNCTION__    
-	template <class T>
-	static void WriteFuncBegin(T x)
-	{
-		CHAR szPath[MAX_PATH] = { 0 };
-		GetLogFilePath(szPath);
-		ofstream fout(szPath, ios::app);
-		fout.seekp(ios::end);
-		fout << GetSystemTime() << "    --------------------" << x << "  Begin--------------------" << endl;
-		fout.close();
-	}
-
-	//输出一行当前函数结束的标志,宏传入__FUNCTION__    
-	template <class T>
-	static void WriteFuncEnd(T x)
-	{
-		CHAR szPath[MAX_PATH] = { 0 };
-		GetLogFilePath(szPath);
-		ofstream fout(szPath, ios::app);
-		fout.seekp(ios::end);
-		fout << GetSystemTime() << "--------------------" << x << "  End  --------------------" << endl;
-		fout.close();
-	}
-
-
-private:
-	//获取本地时间,格式如"[2011-11-11 11:11:11] ";     
-	static string GetSystemTime()
-	{
-		time_t tNowTime;
-		time(&tNowTime);
-		tm* tLocalTime = localtime(&tNowTime);
-		char szTime[30] = { '\0' };
-		strftime(szTime, 30, "[%Y-%m-%d %H:%M:%S] ", tLocalTime);
-		string strTime = szTime;
-		return strTime;
-	}
-
-};
-
-#ifdef LOG_ENABLE    
-
-//用下面这些宏来使用本文件    
-#define LOG(x)              CLog::WriteLog(x);          //括号内可以是字符串(ascii)、整数、浮点数、bool等    
-#define LOG2(x1,x2)     CLog::WriteLog2(x1,x2);    
-#define LOG6(x1,x2,x3,x4,x5,x6)		CLog::WriteLog6(x1,x2,x3,x4,x5,x6);
-#define LOG_FUNC        LOG(__FUNCTION__)               //输出当前所在函数名    
-#define LOG_LINE        LOG(__LINE__)                       //输出当前行号    
-#define LOG_FUNC_BEGIN  CLog::WriteFuncBegin(__FUNCTION__);     //形式如:[时间]"------------FuncName  Begin------------"    
-#define LOG_FUNC_END     CLog::WriteFuncEnd(__FUNCTION__);      //形式如:[时间]"------------FuncName  End------------"    
-
-#else    
-
-#define LOG(x)                  
-#define LOG2(x1,x2)         
-#define LOG6(x1,x2,x3,x4,x5,x6)
-#define LOG_FUNC            
-#define LOG_LINE            
-#define LOG_FUNC_BEGIN      
-#define LOG_FUNC_END        
-
-#endif    
-*/
-#endif      

+ 0 - 69
src/decition/common/common_sf/obstacle_type.h

@@ -1,69 +0,0 @@
-#pragma once
-#ifndef _IV_COMMON_OBSTACLE_TYPE_
-#define _IV_COMMON_OBSTACLE_TYPE_
-#include <vector>
-#include <common/boost.h>
-#include "fusionobjectarray.pb.h"
-/**
-*障碍物类型
-*/
-namespace iv {
-    const int grx = 250, gry = 500, centerx = 125, centery = 250;
-    const double gridwide = 0.2;
-    struct ObstacleBasic
-    {
-        bool valid;
-        float nomal_x;
-        float nomal_y;
-        float nomal_z;
-
-        float speed_relative;
-        float speed_x;
-        float speed_y;
-        float speed_z;
-
-        float high;
-        float low;
-
-        int esr_ID;
-    };
-
-    typedef boost::shared_ptr<std::vector<iv::ObstacleBasic>> ObsLiDAR;
-    typedef boost::shared_ptr<std::vector<iv::ObstacleBasic>> ObsRadar;
-    typedef boost::shared_ptr<std::vector<iv::ObstacleBasic>> ObsCamera;
-    typedef boost::shared_ptr<std::vector<iv::ObstacleBasic>>ObsRadarPointer;
-    typedef boost::shared_ptr<iv::fusion::fusionobjectarray> ObsFsuion;
-    struct Obs_grid
-    {
-        int  id;
-        double speed_x;
-        double speed_y;
-        double yaw;
-        int type;
-        double high;
-        double low;
-        double obshight;
-        int pointcount;
-        int ob;//障碍物属性,0地面 ,1路沿,2障碍物
-    };
-
-    typedef Obs_grid LidarGrid;
-    typedef Obs_grid* LidarGridPtr;
-
-    struct array_360
-    {
-        float x;
-        float y;
-        float z;
-    };
-
-    struct detect_info
-    {
-        int light;
-    };
-
-    typedef detect_info CameraInfo;
-    typedef detect_info* CameraInfoPtr;
-}
-
-#endif // !_IV_COMMON_OBSTACLE_TYPE_

+ 0 - 18
src/decition/common/common_sf/platform_type.h

@@ -1,18 +0,0 @@
-#ifndef PLATFORM_TYPE_H
-#define PLATFORM_TYPE_H
-
-namespace iv {
-namespace platform{
-struct PlatFormMsg
-{
-    int carState = 0;	// 0:停车	1:正常循迹	2:前往站点
-    int istostation = 0;
-    int currentstation = 0;
-    int clientto = 0;
-    double amilng = 0.0;
-    double amilat = 0.0;
-};
-}
-}
-
-#endif // PLATFORM_TYPE_H

+ 0 - 24
src/decition/common/common_sf/roadmode_type.h

@@ -1,24 +0,0 @@
-#ifndef ROADMODE_TYPE_H
-#define ROADMODE_TYPE_H
-
-
-namespace iv {
-    struct roadmode_vel
-    {
-
-        double mfmode0 = 10;
-        double mfmode11 = 30;
-        double mfmode14 = 10;
-        double mfmode15 = 10;
-
-        double mfmode5;
-        double mfmode13;
-        double mfmode16;
-        double mfmode17;
-        double mfmode18;
-
-
-    };
-}
-
-#endif // ROADMODE_TYPE_H

+ 0 - 33
src/decition/common/common_sf/sysparam_type.h

@@ -1,33 +0,0 @@
-#ifndef SYSPARAM_TYPE_H
-#define SYSPARAM_TYPE_H
-
-#include <string>
-
-namespace iv {
-    struct sysparam
-    {
-
-        std::string mstrvin;
-        std::string mstriccid;
-        std::string mstrid;
-        std::string mstrepsoff;
-        std::string mvehtype;
-        std::string mgroup;
-        float mzhuchetime;
-
-        float lidarGpsXiuzheng=3.5;
-        float radarGpsXiuzheng=3.5;
-        float rearRadarGpsXiuzheng=0.5;
-        float rearLidarGpsXiuzheng=3.5;
-        float frontGpsXiuzheng=2.0;
-        float rearGpsXiuzheng=1.0;
-        float lidarMobileyeXiuzheng=0;
-        float radarMobileyeXiuzheng=0;
-        float rearRadarMobileyeXiuzheng=0;
-        float gpsOffset=0;
-
-
-    };
-}
-
-#endif // SYSPARAM_TYPE_H

+ 0 - 19
src/decition/common/common_sf/ultrasonic_type.h

@@ -1,19 +0,0 @@
-#ifndef ULTRASONIC_TYPE_H
-#define ULTRASONIC_TYPE_H
-
-namespace  iv {
-struct ultrasonic_obs
-{
-   float mfront_left;
-   float mfront_leftmid;
-   float mfront_rightmid;
-   float mfront_right;
-   float mrear_left;
-   float mrear_leftmid;
-   float mrear_rightmid;
-   float mrear_right;
-};
-
-}
-
-#endif // ULTRASONIC_TYPE_H

+ 2 - 2
src/decition/common/perception_sf/sensor.h

@@ -4,7 +4,7 @@
 #ifndef _IV_PERCEPTION_SENSOR_
 #define _IV_PERCEPTION_SENSOR_
 
-#include <common_sf/boost.h>
+#include <common/boost.h>
 #include <fcntl.h>
 #include <stdio.h>
 #include <errno.h>
@@ -12,7 +12,7 @@
 #include <string.h>
 #include <iostream>
 #include <sys/types.h>
-#include <common_sf/obstacle_type.h>
+#include <common/obstacle_type.h>
 #include <QtNetwork/QTcpSocket>
 #include <QtNetwork/QUdpSocket>
 

+ 2 - 2
src/decition/common/perception_sf/sensor_gps.h

@@ -3,8 +3,8 @@
 #define _IV_PERCEPTION_SENSOR_GPS_
 
 #include <perception_sf/sensor.h>
-#include <common_sf/gps_type.h>
-#include <common_sf/boost.h>
+#include <common/gps_type.h>
+#include <common/boost.h>
 
 #include "modulecomm.h"
 #include "gpsimu.pb.h"

+ 2 - 2
src/decition/common/perception_sf/sensor_lidar.h

@@ -9,8 +9,8 @@
 #define Lidar32 (unsigned long)3405883584//192.168.1.203
 #define Lidar_roll_ang -3.15*Lidar_Pi/180.0
 
-#include <common_sf/boost.h>
-#include <common_sf/lidar.h>
+#include <common/boost.h>
+#include <common/lidar.h>
 #include <perception_sf/sensor.h>
 #include "fusionobjectarray.pb.h"
 #include <mutex>

+ 1 - 1
src/decition/common/perception_sf/sensor_radar.h

@@ -2,7 +2,7 @@
 #ifndef _IV_PERCEPTION_SENSOR_RADAR_
 #define _IV_PERCEPTION_SENSOR_RADAR_
 
-#include <common_sf/boost.h>
+#include <common/boost.h>
 #include <perception_sf/sensor.h>
 
 #include "radarobjectarray.pb.h"

+ 1 - 1
src/decition/decition_brain/decition/brain.cpp

@@ -622,7 +622,7 @@ void iv::decition::BrainDecition::run() {
                     decition_gps->wheel_angle = mpc_wheel;
                 }
             }
-            iv::modulecomm::ModuleSendMsg(mpaPlanTrace,(char *)decitionGps00->planTrace.data(),decitionGps00->planTrace.size()*sizeof(iv::Point2D));
+            iv::modulecomm::ModuleSendMsg(mpaPlanTrace,(char *)decitionGps00->planTrace.data(),decitionGps00->planTrace.size()*sizeof(iv::TracePoint));
 
 
 

+ 8 - 1
src/decition/decition_brain/decition/decide_gps_00.cpp

@@ -1069,7 +1069,14 @@ iv::decition::Decition iv::decition::DecideGps00::getDecideFromGPS(GPS_INS now_g
     //  dSpeed = getSpeed(gpsTraceNow);
     dSpeed = 80;
 
-    planTrace = gpsTraceNow; //Add By YuChuli, 2020.11.26
+ //   planTrace = gpsTraceNow; //Add By YuChuli, 2020.11.26
+
+    planTrace.clear();
+    for(int i=0;i<gpsTraceNow.size();i++){
+        TracePoint pt(gpsTraceNow[i].x,gpsTraceNow[i].y);
+        planTrace.push_back(pt);
+    }
+
 
     dSpeed = limitSpeed(controlAng, dSpeed);
 

+ 1 - 1
src/decition/decition_brain/decition/decide_gps_00.h

@@ -226,7 +226,7 @@ public:
     double ObsTimeStart=-1;
     double ObsTimeEnd=-1;
     float ObsTimeWidth=1500;
-    std::vector<iv::Point2D> planTrace;
+    std::vector<iv::TracePoint> planTrace;
 private:
     //  void changeRoad(int roadNum);
 

+ 2 - 2
src/decition/decition_brain_sf/decition/adc_adapter/base_adapter.h

@@ -3,9 +3,9 @@
 
 
 
-#include <common_sf/gps_type.h>
+#include <common/gps_type.h>
 #include <decition/decition_type.h>
-#include <common_sf/obstacle_type.h>
+#include <common/obstacle_type.h>
 #include<vector>
 #include <decition/adc_tools/gnss_coordinate_convert.h>
 

+ 2 - 2
src/decition/decition_brain_sf/decition/adc_adapter/bus_adapter.h

@@ -2,9 +2,9 @@
 #define BUS_ADAPTER_H
 
 
-#include <common_sf/gps_type.h>
+#include <common/gps_type.h>
 #include <decition/decition_type.h>
-#include <common_sf/obstacle_type.h>
+#include <common/obstacle_type.h>
 #include <vector>
 #include <decition/adc_tools/gnss_coordinate_convert.h>
 #include <decition/adc_adapter/base_adapter.h>

+ 2 - 2
src/decition/decition_brain_sf/decition/adc_adapter/ge3_adapter.h

@@ -3,9 +3,9 @@
 
 
 
-#include <common_sf/gps_type.h>
+#include <common/gps_type.h>
 #include <decition/decition_type.h>
-#include <common_sf/obstacle_type.h>
+#include <common/obstacle_type.h>
 #include<vector>
 #include <decition/adc_tools/gnss_coordinate_convert.h>
 #include <decition/adc_adapter/base_adapter.h>

+ 2 - 2
src/decition/decition_brain_sf/decition/adc_adapter/qingyuan_adapter.h

@@ -1,9 +1,9 @@
 #ifndef QINGYUAN_ADAPTER_H
 #define QINGYUAN_ADAPTER_H
 
-#include <common_sf/gps_type.h>
+#include <common/gps_type.h>
 #include <decition/decition_type.h>
-#include <common_sf/obstacle_type.h>
+#include <common/obstacle_type.h>
 #include<vector>
 #include <decition/adc_tools/gnss_coordinate_convert.h>
 #include <decition/adc_adapter/base_adapter.h>

+ 2 - 2
src/decition/decition_brain_sf/decition/adc_adapter/vv7_adapter.h

@@ -3,9 +3,9 @@
 
 
 
-#include <common_sf/gps_type.h>
+#include <common/gps_type.h>
 #include <decition/decition_type.h>
-#include <common_sf/obstacle_type.h>
+#include <common/obstacle_type.h>
 #include<vector>
 #include <decition/adc_tools/gnss_coordinate_convert.h>
 #include <decition/adc_adapter/base_adapter.h>

+ 2 - 2
src/decition/decition_brain_sf/decition/adc_adapter/zhongche_adapter.h

@@ -2,9 +2,9 @@
 #define ZHONGCHE_ADAPTER_H
 
 
-#include <common_sf/gps_type.h>
+#include <common/gps_type.h>
 #include <decition/decition_type.h>
-#include <common_sf/obstacle_type.h>
+#include <common/obstacle_type.h>
 #include<vector>
 #include <decition/adc_tools/gnss_coordinate_convert.h>
 #include <decition/adc_adapter/base_adapter.h>

+ 2 - 2
src/decition/decition_brain_sf/decition/adc_controller/base_controller.h

@@ -2,9 +2,9 @@
 #ifndef _IV_DECITION__BASE_CONTROLLER_
 #define _IV_DECITION__BASE_CONTROLLER_
 
-#include <common_sf/gps_type.h>
+#include <common/gps_type.h>
 #include <decition/decition_type.h>
-#include <common_sf/obstacle_type.h>
+#include <common/obstacle_type.h>
 #include<vector>
 #include <decition/adc_tools/gnss_coordinate_convert.h>
 

+ 2 - 2
src/decition/decition_brain_sf/decition/adc_controller/pid_controller.h

@@ -1,9 +1,9 @@
 #ifndef _IV_DECITION__PID_CONTROLLER_
 #define _IV_DECITION__PID_CONTROLLER_
 
-#include <common_sf/gps_type.h>
+#include <common/gps_type.h>
 #include <decition/decition_type.h>
-#include <common_sf/obstacle_type.h>
+#include <common/obstacle_type.h>
 #include<vector>
 #include <decition/adc_tools/gnss_coordinate_convert.h>
 #include <decition/adc_controller/base_controller.h>

+ 2 - 2
src/decition/decition_brain_sf/decition/adc_planner/base_planner.h

@@ -1,9 +1,9 @@
 #ifndef _IV_DECITION__BASE_PLANNER_
 #define _IV_DECITION__BASE_PLANNER_
 
-#include <common_sf/gps_type.h>
+#include <common/gps_type.h>
 #include <decition/decition_type.h>
-#include <common_sf/obstacle_type.h>
+#include <common/obstacle_type.h>
 #include<vector>
 #include <decition/adc_tools/gnss_coordinate_convert.h>
 #include "perception/perceptionoutput.h"

+ 2 - 2
src/decition/decition_brain_sf/decition/adc_tools/compute_00.h

@@ -2,8 +2,8 @@
 #ifndef _IV_DECITION_COMPUTE_00_
 #define _IV_DECITION_COMPUTE_00_
 
-#include <common_sf/gps_type.h>
-#include <common_sf/obstacle_type.h>
+#include <common/gps_type.h>
+#include <common/obstacle_type.h>
 #include <decition/decition_type.h>
 #include<vector> 
 #include <decition/decide_gps_00.h>

+ 3 - 3
src/decition/decition_brain_sf/decition/adc_tools/gnss_coordinate_convert.cpp

@@ -22,7 +22,7 @@ void gps2xy(double J4, double K4, double *x, double *y)
     *x = 500000 + T4 * V4 * (Y4 + Z4);
 }
 
-/*
+
 
 //高斯投影由经纬度(Unit:DD)反算大地坐标(含带号,Unit:Metres)
 void GaussProjCal(double longitude, double latitude, double *X, double *Y)
@@ -59,7 +59,7 @@ void GaussProjCal(double longitude, double latitude, double *X, double *Y)
     *Y = yval;
 }
 
-*/
+/*
 
 //=======================zhaobo0904
 #define PI  3.14159265358979
@@ -110,7 +110,7 @@ void GaussProjCal(double lon, double lat, double *X, double *Y)
 }
 //==========================================================
 
-
+*/
 
 
 //高斯投影由大地坐标(Unit:Metres)反算经纬度(Unit:DD)

+ 1 - 1
src/decition/decition_brain_sf/decition/adc_tools/parameter_status.h

@@ -4,7 +4,7 @@
 
 
 
-#include <common_sf/boost.h>
+#include <common/boost.h>
 #include <cstdint>
 #include <boost/serialization/singleton.hpp>
 #include <control/vv7.h>

+ 1 - 1
src/decition/decition_brain_sf/decition/adc_tools/transfer.h

@@ -2,7 +2,7 @@
 #ifndef _IV_DECITION_TRANSFER_
 #define _IV_DECITION_TRANSFER_
 
-#include <common_sf/gps_type.h>
+#include <common/gps_type.h>
 #include <decition/decition_type.h>
 #include<vector> 
 

+ 2 - 1
src/decition/decition_brain_sf/decition/brain.cpp

@@ -226,6 +226,7 @@ void iv::decition::BrainDecition::run() {
     QString strpath = QCoreApplication::applicationDirPath();
     strpath = strpath + "/ADS_decision.xml";
     iv::xmlparam::Xmlparam xp(strpath.toStdString());
+
     ServiceCarStatus.msysparam.mstrvin = xp.GetParam("vin","10000000000000001");
     ServiceCarStatus.msysparam.mstrid = xp.GetParam("id","1");
     ServiceCarStatus.msysparam.mstriccid = xp.GetParam("iccid","11111111111111111111");
@@ -633,7 +634,7 @@ void iv::decition::BrainDecition::run() {
                     decition_gps->wheel_angle = mpc_wheel;
                 }
             }
-            iv::modulecomm::ModuleSendMsg(mpaPlanTrace,(char *)decitionGps00->planTrace.data(),decitionGps00->planTrace.size()*sizeof(iv::Point2D));
+            iv::modulecomm::ModuleSendMsg(mpaPlanTrace,(char *)decitionGps00->planTrace.data(),decitionGps00->planTrace.size()*sizeof(iv::TracePoint));
 
 
 

+ 5 - 5
src/decition/decition_brain_sf/decition/brain.h

@@ -6,8 +6,8 @@
 #ifndef _IV_DECITION_BRAIN_
 #define _IV_DECITION_BRAIN_
 
-#include <common_sf/boost.h>
-#include <common_sf/gps_type.h>
+#include <common/boost.h>
+#include <common/gps_type.h>
 //#include <control/controller.h>
 //#include <control/can.h>
 #include <perception/eyes.h>
@@ -26,9 +26,9 @@
 //#include "adcivstatedb.h"
 
 //#include "decition/vehiclestate_type.h"
-#include "common_sf/hmi_type.h"
-#include "common_sf/platform_type.h"
-#include"common_sf/gps_type.h"
+#include "common/hmi_type.h"
+#include "common/platform_type.h"
+#include"common/gps_type.h"
 
 #include <QMutex>
 #include <QTime>

+ 7 - 1
src/decition/decition_brain_sf/decition/decide_gps_00.cpp

@@ -1068,7 +1068,13 @@ iv::decition::Decition iv::decition::DecideGps00::getDecideFromGPS(GPS_INS now_g
     //  dSpeed = getSpeed(gpsTraceNow);
     dSpeed = 80;
 
-    planTrace = gpsTraceNow; //Add By YuChuli, 2020.11.26
+    //planTrace = gpsTraceNow; //Add By YuChuli, 2020.11.26
+    planTrace.clear();
+    for(int i=0;i<gpsTraceNow.size();i++){
+        TracePoint pt(gpsTraceNow[i].x,gpsTraceNow[i].y);
+        planTrace.push_back(pt);
+    }
+
 
     dSpeed = limitSpeed(controlAng, dSpeed);
 

+ 3 - 3
src/decition/decition_brain_sf/decition/decide_gps_00.h

@@ -2,9 +2,9 @@
 #ifndef _IV_DECITION__DECIDE_GPS_00_
 #define _IV_DECITION__DECIDE_GPS_00_
 
-#include <common_sf/gps_type.h>
+#include <common/gps_type.h>
 #include <decition/decition_type.h>
-#include <common_sf/obstacle_type.h>
+#include <common/obstacle_type.h>
 #include <vector>
 #include <decition/adc_tools/gnss_coordinate_convert.h>
 #include <decition/adc_planner/frenet_planner.h>
@@ -222,7 +222,7 @@ public:
     double ObsTimeStart=-1;
     double ObsTimeEnd=-1;
     float ObsTimeWidth=1500;
-    std::vector<iv::Point2D> planTrace;
+    std::vector<iv::TracePoint> planTrace;
 private:
     //  void changeRoad(int roadNum);
 

+ 2 - 2
src/decition/decition_brain_sf/decition/decide_line_00.h

@@ -2,9 +2,9 @@
 #ifndef _IV_DECITION__DECIDE_LINE_00_
 #define _IV_DECITION__DECIDE_LINE_00_
 
-#include <common_sf/gps_type.h>
+#include <common/gps_type.h>
 #include <decition/decition_type.h>
-#include <common_sf/obstacle_type.h>
+#include <common/obstacle_type.h>
 #include<vector> 
 #include <decition/gnss_coordinate_convert.h>
 #include <decition/decide_gps_00.h>

+ 1 - 1
src/decition/decition_brain_sf/decition/decition_maker.h

@@ -2,7 +2,7 @@
 #ifndef _IV_DECITION_DECITION_MAKER_
 #define _IV_DECITION_DECITION_MAKER_
 
-#include <common_sf/gps_type.h>
+#include <common/gps_type.h>
 #include <decition/decition_type.h>
 #include<vector> 
 

+ 1 - 1
src/decition/decition_brain_sf/decition/decition_type.h

@@ -1,7 +1,7 @@
 #pragma once
 #ifndef _IV_DECITION_DECITION_TYPE_
 #define _IV_DECITION_DECITION_TYPE_
-#include <common_sf/boost.h>
+#include <common/boost.h>
 namespace iv {
 namespace decition {
 struct DecitionBasic {

+ 2 - 2
src/decition/decition_brain_sf/decition/obs_predict.h

@@ -1,8 +1,8 @@
 #ifndef OBS_PREDICT_H
 #define OBS_PREDICT_H
 
-#include <common_sf/gps_type.h>
-#include <common_sf/obstacle_type.h>
+#include <common/gps_type.h>
+#include <common/obstacle_type.h>
 #include <decition/decition_type.h>
 #include<vector>
 #include <decition/decide_gps_00.h>

+ 3 - 2
src/decition/decition_brain_sf/decition_brain_sf.pro

@@ -34,7 +34,7 @@ SOURCES += $$PWD/../common/main.cpp \
     ../../include/msgtype/fusionobject.pb.cc \
 
 
-include($$PWD/../common/common_sf/common_sf.pri)
+include($$PWD/../common/common/common.pri)
 include($$PWD/decition/decition.pri)
 include($$PWD/../common/perception_sf/perception_sf.pri)
 #include(platform/platform.pri)
@@ -87,6 +87,7 @@ HEADERS += \
     ../common/perception_sf/sensor_camera.h \
     ../common/perception_sf/sensor_gps.h \
     ../common/perception_sf/sensor_lidar.h \
-    ../common/perception_sf/sensor_radar.h
+    ../common/perception_sf/sensor_radar.h \
+    ../common/common/sysparam_type.h