Browse Source

change tool/map_lanetoxodr, complete noavoid edit. change driver/driver_map_xodrload,add noavoid and curvatrue. change gps_type.h. Relation projcet need compile.

yuchuli 3 years ago
parent
commit
bc4e9ca27d

+ 44 - 0
src/common/common/xodr/OpenDrive/Road.cpp

@@ -1049,6 +1049,25 @@ short int Road::GetGeometryCoords(double s_check, double &retX, double &retY, do
 	return -999;
 }
 
+double Road::GetRoadCurvature(double s_check)
+{
+    //go trough all of the blocks
+    for (unsigned int i=0; i<mGeometryBlockVector.size();i++)
+    {
+        if(mGeometryBlockVector.size()>0)
+        {
+  //          if(mGeometryBlockVector[i].GetGeometryAt(0)->GetS()<s_check
+        }
+        //Check the block and get coords.
+        double res=mGeometryBlockVector.at(i).GetRoadCurvature(s_check);
+        // If the returned value is one of the geometry types (for 0=line,1=arc and 2=spiral) then the result has been found and parameters filled, so, return the value
+        if (res>=0  )
+            return res;
+    }
+    //if s_check does not belong to the road, return -999
+    return 0.0;
+}
+
 int Road::GetRoadSpeedMax(double s_check, double &fspeed)
 {
     if(mRoadTypeVector.size() == 0)
@@ -1078,6 +1097,31 @@ int Road::GetRoadSpeedMax(double s_check, double &fspeed)
 }
 //-----------
 
+int Road::GetRoadNoavoid(double s_check, bool &bNoavoid)
+{
+    if(mRoadNoavoidVector.size() == 0)
+    {
+        bNoavoid = false;
+        return -1;
+    }
+
+    unsigned int i;
+    for(i=0;i<mRoadNoavoidVector.size();i++)
+    {
+        double s_start = mRoadNoavoidVector[i].GetS();
+        double len = mRoadNoavoidVector[i].GetLength();
+        if((s_check >= s_start)&&(s_check <(s_start+len)))
+        {
+            bNoavoid = true;
+            return i;
+        }
+    }
+
+    bNoavoid = false;
+    return -2;
+}
+//-----------
+
 /**
  * Other evaluation
  */

+ 2 - 0
src/common/common/xodr/OpenDrive/Road.h

@@ -317,8 +317,10 @@ public:
 	bool CheckGeometryInterval (double s_check, string &roadId);
 	short int GetGeometryCoords(double s_check, double &retX, double &retY);
 	short int GetGeometryCoords(double s_check, double &retX, double &retY, double &retHDG);
+    double GetRoadCurvature(double s_check);
 	
     int GetRoadSpeedMax(double s_check,double & fspeed);
+    int GetRoadNoavoid(double s_check,bool & bNoavoid);
 
 	/**
 	 * Other evaluation

+ 147 - 1
src/common/common/xodr/OpenDrive/RoadGeometry.cpp

@@ -186,6 +186,9 @@ void  RoadGeometry::GetCoords(double s_check, double &retX, double &retY)
 void RoadGeometry::GetCoords(double s_check, double &retX, double &retY, double &retHDG)
 {}
 
+double RoadGeometry::GetRoadCurvature(double s_check)
+{return 0.0;}
+
 
 
 //***********************************************************************************
@@ -234,7 +237,10 @@ void GeometryLine::GetCoords(double s_check, double &retX, double &retY, double
 	retHDG=mHdg;
 }
 
-
+double GeometryLine::GetRoadCurvature(double s_check)
+{
+    return 0.0;
+}
 
 
 
@@ -340,7 +346,14 @@ void GeometryArc::GetCoords(double s_check, double &retX, double &retY, double &
 		retHDG=endAngle+M_PI_2;
 }
 
+double GeometryArc::GetRoadCurvature(double s_check)
+{
+    double currentLength = s_check - mS;
+    if(currentLength<0)return 0.0;
+    if(currentLength>mLength)return 0.0;
 
+    return fabs(mCurvature);
+}
 
 
 
@@ -432,6 +445,31 @@ RoadGeometry* GeometrySpiral::Clone() const
 	return ret;
 }
 
+double GeometrySpiral::GetRoadCurvature(double s_check)
+{
+    double currentLength = s_check - mS;
+    if(currentLength<0)return 0.0;
+    if(currentLength>mLength)return 0.0;
+
+    if(mLength < 0.1)return 0.0;
+    if(currentLength<0.05)return fabs(mCurvatureStart);
+    if(currentLength>(mLength-0.05))return fabs(mCurvatureEnd);
+
+    double fx1,fy1,fhdg1;
+    double fx2,fy2,fhdg2;
+    GetCoords(s_check-0.05,fx1,fy1,fhdg1);
+    GetCoords(s_check+0.05,fx2,fy2,fhdg2);
+    if(fhdg1 == fhdg2)
+    {
+        return 0.0;
+    }
+    double fhdgdiff = fabs(fhdg2 - fhdg1);
+    while(fhdgdiff>=2.0*M_PI)fhdgdiff = fhdgdiff - 2.0*M_PI;
+
+    if(fhdgdiff > M_PI)fhdgdiff = 2.0 * M_PI - fhdgdiff;
+    double fcurv = fhdgdiff/0.1;
+    return fcurv;
+}
 
 //-------------------------------------------------
 
@@ -782,6 +820,52 @@ void GeometryPoly3::GetCoords(double s_check, double &retX, double &retY, double
 
     }
 }
+
+double GeometryPoly3::GetRoadCurvature(double s_check)
+{
+    double currentLength = s_check - mS;
+    if(currentLength<0)return 0.0;
+    if(currentLength>mLength)return 0.0;
+
+    if(mLength < 0.1)return 0.0;
+    double fmove1;
+    double fmove2;
+    if(currentLength<0.05)
+    {
+        fmove1 = 0;
+        fmove2 = 0.05;
+    }
+    else
+    {
+        if(currentLength>(mLength-0.05))
+        {
+            fmove1 = -0.05;
+            fmove2 = 0.0;
+        }
+        else
+        {
+            fmove1 = -0.05;
+            fmove2 = 0.05;
+        }
+    }
+
+
+    double fx1,fy1,fhdg1;
+    double fx2,fy2,fhdg2;
+    GetCoords(s_check+fmove1,fx1,fy1,fhdg1);
+    GetCoords(s_check+fmove2,fx2,fy2,fhdg2);
+    if(fhdg1 == fhdg2)
+    {
+        return 0.0;
+    }
+    double fhdgdiff = fabs(fhdg2 - fhdg1);
+    while(fhdgdiff>=2.0*M_PI)fhdgdiff = fhdgdiff - 2.0*M_PI;
+
+    if(fhdgdiff > M_PI)fhdgdiff = 2.0 * M_PI - fhdgdiff;
+    double fcurv = fhdgdiff/0.1;
+    return fcurv;
+}
+
 //***********************************************************************************
 //Cubic Polynom geometry. Has to be implemented.  Added By Yuchuli
 //***********************************************************************************
@@ -945,6 +1029,52 @@ void GeometryParamPoly3::GetCoords(double s_check, double &retX, double &retY, d
     }
 }
 
+
+double GeometryParamPoly3::GetRoadCurvature(double s_check)
+{
+    double currentLength = s_check - mS;
+    if(currentLength<0)return 0.0;
+    if(currentLength>mLength)return 0.0;
+
+    if(mLength < 0.1)return 0.0;
+    double fmove1;
+    double fmove2;
+    if(currentLength<0.05)
+    {
+        fmove1 = 0;
+        fmove2 = 0.05;
+    }
+    else
+    {
+        if(currentLength>(mLength-0.05))
+        {
+            fmove1 = -0.05;
+            fmove2 = 0.0;
+        }
+        else
+        {
+            fmove1 = -0.05;
+            fmove2 = 0.05;
+        }
+    }
+
+
+    double fx1,fy1,fhdg1;
+    double fx2,fy2,fhdg2;
+    GetCoords(s_check+fmove1,fx1,fy1,fhdg1);
+    GetCoords(s_check+fmove2,fx2,fy2,fhdg2);
+    if(fhdg1 == fhdg2)
+    {
+        return 0.0;
+    }
+    double fhdgdiff = fabs(fhdg2 - fhdg1);
+    while(fhdgdiff>=2.0*M_PI)fhdgdiff = fhdgdiff - 2.0*M_PI;
+
+    if(fhdgdiff > M_PI)fhdgdiff = 2.0 * M_PI - fhdgdiff;
+    double fcurv = fhdgdiff/0.1;
+    return fcurv;
+}
+
 //***********************************************************************************
 //Base class for Geometry blocks
 //***********************************************************************************
@@ -1198,6 +1328,22 @@ short int  GeometryBlock::GetCoords(double s_check, double &retX, double &retY,
 
 }
 
+double GeometryBlock::GetRoadCurvature(double s_check)
+{
+    // go through all the elements
+    for (unsigned int i=0;i<mGeometryBlockElement.size();i++)
+    {
+        //if the s_check belongs to one of the geometries
+        if (mGeometryBlockElement.at(i)->CheckInterval(s_check))
+        {
+            //get the x,y coords and return the type of the geometry
+            return mGeometryBlockElement.at(i)->GetRoadCurvature(s_check);
+        }
+    }
+    //if nothing found, return -999
+    return -1.0;
+}
+
 //-------------------------------------------------
 /**
  *  Destructor

+ 8 - 0
src/common/common/xodr/OpenDrive/RoadGeometry.h

@@ -99,6 +99,7 @@ public:
 	virtual bool CheckInterval (double s_check);
 	virtual void GetCoords(double s_check, double &retX, double &retY);
 	virtual void GetCoords(double s_check, double &retX, double &retY, double &retHDG);
+    virtual double GetRoadCurvature(double s_check);
 protected:
 
 	/**
@@ -140,6 +141,8 @@ public:
 	 */
 	void GetCoords(double s_check, double &retX, double &retY, double &retHDG);
 
+    double GetRoadCurvature(double s_check);
+
 };
 //----------------------------------------------------------------------------------
 /**
@@ -197,6 +200,7 @@ public:
 	 * Gets the coordinates at the sample S offset
 	 */
 	void GetCoords(double s_check, double &retX, double &retY, double &retHDG);
+    double GetRoadCurvature(double s_check);
 protected:
 
 	/**
@@ -268,6 +272,7 @@ public:
 	 * Gets the coordinates at the sample S offset
 	 */
 	void GetCoords(double s_check, double &retX, double &retY, double &retHDG);
+    double GetRoadCurvature(double s_check);
 protected:
 
 	/**
@@ -321,6 +326,7 @@ public:
     double GetD();
 
     void GetCoords(double s_check, double &retX, double &retY, double &retHDG);
+    double GetRoadCurvature(double s_check);
 
 };
 
@@ -382,6 +388,7 @@ public:
     bool GetNormal();
 
     void GetCoords(double s_check, double &retX, double &retY, double &retHDG);
+    double GetRoadCurvature(double s_check);
 };
 
 
@@ -463,6 +470,7 @@ public:
 	bool CheckInterval(double s_check);
 	virtual short int GetCoords(double s_check, double &retX, double &retY);
 	virtual short int GetCoords(double s_check, double &retX, double &retY, double &retHDG);
+    virtual double GetRoadCurvature(double s_check);
 
 	//-------------------------------------------------
 	/**

+ 15 - 81
src/decition/common/common/gps_type.h

@@ -5,7 +5,7 @@
 #ifndef _IV_COMMON_GPS_TYPE_
 #define _IV_COMMON_GPS_TYPE_
 
-#include <common/boost.h>
+#include "boost.h"
 namespace iv {
     struct GPS_INS
     {
@@ -44,19 +44,19 @@ namespace iv {
 
         int speed_mode = 0;
         int mode2 = 0;
-        double speed = -1;			//速度  若导航点则为导航预设速度  若为当前点则为当前车速
+        double speed = 0;			//速度  若导航点则为导航预设速度  若为当前点则为当前车速
 
         int roadMode;
         int runMode;
         int roadSum;
         int roadOri;
 
-    double mfLaneWidth = 3.5; // Current Lane Width
+        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
+        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
 
         bool mbInLaneAvoid = false; //if true suport In Lane Avoid
         double gps_lat_avoidleft;
@@ -68,30 +68,23 @@ namespace iv {
         double gps_x_avoidright = 0;
         double gps_y_avoidright = 0;
 
+        bool mbnoavoid = false; //If true this point is no avoid.
+        double mfCurvature = 0.0;
 
+        char mcreserved[10];
+        int mnreserved[5];
+        double mfreserved[2];
 
-    };
-
-//    typedef std::shared_ptr<iv::GPS_INS> GPSData;
-    typedef boost::shared_ptr<iv::GPS_INS> GPSData;
-
-   struct Station
-   {
-       int index;
-       GPS_INS station_location;
-       int map_index;
-   };
 
 
+    };
 
+    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;
+          double x = 0, y = 0, speed=0;
          int v1 = 0, v2 = 0;
-         int roadMode = 0;
-         int obs_type=0;
-
 
          Point2D()
         {
@@ -106,65 +99,6 @@ 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
-    {
-      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;
-         }
-     };
-
 
 
 

+ 12 - 7
src/decition/decition_external/gps_type.h

@@ -51,12 +51,12 @@ namespace iv {
         int roadSum;
         int roadOri;
 
-    double mfLaneWidth = 3.5; // Current Lane Width
+        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
+        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
 
         bool mbInLaneAvoid = false; //if true suport In Lane Avoid
         double gps_lat_avoidleft;
@@ -68,18 +68,23 @@ namespace iv {
         double gps_x_avoidright = 0;
         double gps_y_avoidright = 0;
 
+        bool mbnoavoid = false; //If true this point is no avoid.
+        double mfCurvature = 0.0;
+
+        char mcreserved[10];
+        int mnreserved[5];
+        double mfreserved[2];
+
 
 
     };
 
-//    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;
          int v1 = 0, v2 = 0;
-         int roadMode = 0;
 
          Point2D()
         {

+ 61 - 57
src/detection/detection_ndt_slam_hcp2/common/gps_type.h

@@ -5,58 +5,58 @@
 #ifndef _IV_COMMON_GPS_TYPE_
 #define _IV_COMMON_GPS_TYPE_
 
-#include <common/boost.h>
+#include "boost.h"
 namespace iv {
-struct GPS_INS
-{
-    int valid = 0xff;
-    int index = 0;	//gps点序号
+    struct GPS_INS
+    {
+        int valid = 0xff;
+        int index = 0;	//gps点序号
 
-    double gps_lat = 0;//纬度
-    double gps_lng = 0;//经度
+        double gps_lat = 0;//纬度
+        double gps_lng = 0;//经度
 
-    double gps_x = 0;
-    double gps_y = 0;
-    double gps_z = 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;	//航向角
+        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;
+        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 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 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;
+        //-----------方向速度--------------
+        double vel_N = 0;
+        double vel_E = 0;
+        double vel_D = 0;
 
-    int speed_mode = 0;
-    int mode2 = 0;
-    double speed = 0;			//速度  若导航点则为导航预设速度  若为当前点则为当前车速
+        int speed_mode = 0;
+        int mode2 = 0;
+        double speed = 0;			//速度  若导航点则为导航预设速度  若为当前点则为当前车速
 
-    int roadMode;
-    int runMode;
-    int roadSum;
-    int roadOri;
+        int roadMode;
+        int runMode;
+        int roadSum;
+        int roadOri;
 
-    double mfLaneWidth = 3.5; // Current Lane Width
+        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
+        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
 
         bool mbInLaneAvoid = false; //if true suport In Lane Avoid
         double gps_lat_avoidleft;
@@ -68,32 +68,36 @@ struct GPS_INS
         double gps_x_avoidright = 0;
         double gps_y_avoidright = 0;
 
+        bool mbnoavoid = false; //If true this point is no avoid.
+        double mfCurvature = 0.0;
 
-
-};
-
-typedef boost::shared_ptr<iv::GPS_INS> GPSData;
+        char mcreserved[10];
+        int mnreserved[5];
+        double mfreserved[2];
 
 
 
-class Point2D
-{
-public:
-    double x = 0, y = 0, speed=0;
-    int v1 = 0, v2 = 0;
+    };
 
-    Point2D()
+    typedef boost::shared_ptr<iv::GPS_INS> GPSData;
+     class Point2D
     {
-        x = y = v1 = 0;
-    }
+      public:
+          double x = 0, y = 0, speed=0;
+         int v1 = 0, v2 = 0;
 
-    Point2D(double _x, double _y)
-    {
-        x = _x; y = _y;
-    }
+         Point2D()
+        {
+            x = y = v1 = 0;
+        }
+
+         Point2D(double _x, double _y)
+        {
+            x = _x; y = _y;
+        }
 
 
-};
+     };
 
 
 

+ 12 - 5
src/driver/driver_map_trace/gps_type.h

@@ -51,12 +51,12 @@ namespace iv {
         int roadSum;
         int roadOri;
 
-    double mfLaneWidth = 3.5; // Current Lane Width
+        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
+        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
 
         bool mbInLaneAvoid = false; //if true suport In Lane Avoid
         double gps_lat_avoidleft;
@@ -68,6 +68,13 @@ namespace iv {
         double gps_x_avoidright = 0;
         double gps_y_avoidright = 0;
 
+        bool mbnoavoid = false; //If true this point is no avoid.
+        double mfCurvature = 0.0;
+
+        char mcreserved[10];
+        int mnreserved[5];
+        double mfreserved[2];
+
 
 
     };

+ 13 - 6
src/driver/driver_map_xodrload/globalplan.cpp

@@ -1264,17 +1264,19 @@ std::vector<PlanPoint> GetPoint(pathsection xpath,const double fspace = 0.1)
             }
         }
 
+
         double s1 = prg->GetLength();
+
         switch (prg->GetGeomType()) {
         case 0:
             xvectorPP = getlinepoint((GeometryLine *)prg,fspace);
+
             break;
         case 1:
             xvectorPP = getspiralpoint((GeometrySpiral *)prg,fspace);
             break;
         case 2:
             xvectorPP = getarcpoint((GeometryArc *)prg,fspace);
-
             break;
         case 3:
 
@@ -1298,6 +1300,9 @@ std::vector<PlanPoint> GetPoint(pathsection xpath,const double fspace = 0.1)
         for(j=0;j<xvectorPP.size();j++)
         {
             PlanPoint pp = xvectorPP.at(j);
+
+            pp.mfCurvature = pRoad->GetRoadCurvature(pp.mS);
+
             if(((pp.dis+prg->GetS()) >= s_start) &&((pp.dis+prg->GetS()) <= s_end))
             {
                 if(s_start > prg->GetS())
@@ -1611,7 +1616,7 @@ double GetRoadWidth(std::vector<iv::lanewidthabcd> xvectorLWA,int nlane,double s
 
 }
 
-int GetLaneOriTotal(Road * pRoad, int nlane,double s,int & nori, int & ntotal,double & fSpeed)
+int GetLaneOriTotal(Road * pRoad, int nlane,double s,int & nori, int & ntotal,double & fSpeed,bool & bNoavoid)
 {
     if(pRoad->GetLaneSectionCount() < 1)return -1;
 
@@ -1640,6 +1645,8 @@ int GetLaneOriTotal(Road * pRoad, int nlane,double s,int & nori, int & ntotal,do
 
     pRoad->GetRoadSpeedMax(s,fSpeed);   //Get Road Speed Limit.
 
+    pRoad->GetRoadNoavoid(s,bNoavoid);
+
     int nlanecount = pLS->GetLaneCount();
     for(i=0;i<nlanecount;i++)
     {
@@ -2054,7 +2061,7 @@ std::vector<PlanPoint> GetLanePoint(pathsection xps,std::vector<PlanPoint> xvPP,
             pp.lanmp = 0;
             pp.mfDisToRoadLeft = off1*(-1);
             pp.mfRoadWidth = GetRoadWidth(xvectorLWA,xps.mainsel,pp.mS);
-            GetLaneOriTotal(xps.mpRoad,xps.mainsel,pp.mS,pp.mnLaneori,pp.mnLaneTotal,pp.speed);
+            GetLaneOriTotal(xps.mpRoad,xps.mainsel,pp.mS,pp.mnLaneori,pp.mnLaneTotal,pp.speed,pp.mbNoavoid);
 
             xvectorPP.push_back(pp);
         }
@@ -2102,7 +2109,7 @@ std::vector<PlanPoint> GetLanePoint(pathsection xps,std::vector<PlanPoint> xvPP,
             pp.lanmp = 0;
             pp.mfDisToRoadLeft = off1;
             pp.mfRoadWidth = GetRoadWidth(xvectorLWA,xps.mainsel,pp.mS);
-            GetLaneOriTotal(xps.mpRoad,xps.mainsel,pp.mS,pp.mnLaneori,pp.mnLaneTotal,pp.speed);
+            GetLaneOriTotal(xps.mpRoad,xps.mainsel,pp.mS,pp.mnLaneori,pp.mnLaneTotal,pp.speed,pp.mbNoavoid);
 
             pp.hdg = pp.hdg + M_PI;
             xvectorPP.push_back(pp);
@@ -2822,7 +2829,7 @@ int MakePlan(xodrdijkstra * pxd,OpenDrive * pxodr,const double x_now,const doubl
                     pp.lanmp = 0;
                     pp.mfDisToRoadLeft = foff *(-1.0);
                     pp.mfRoadWidth = GetRoadWidth(xvectorLWA,nlane,pp.mS);
-                    GetLaneOriTotal(pRoad,nlane,pp.mS,pp.mnLaneori,pp.mnLaneTotal,pp.speed);
+                    GetLaneOriTotal(pRoad,nlane,pp.mS,pp.mnLaneori,pp.mnLaneTotal,pp.speed,pp.mbNoavoid);
 
                     xvectorPP.push_back(pp);
                     i++;
@@ -2840,7 +2847,7 @@ int MakePlan(xodrdijkstra * pxd,OpenDrive * pxodr,const double x_now,const doubl
                     pp.lanmp = 0;
                     pp.mfDisToRoadLeft = foff;
                     pp.mfRoadWidth = GetRoadWidth(xvectorLWA,nlane,pp.mS);
-                    GetLaneOriTotal(pRoad,nlane,pp.mS,pp.mnLaneori,pp.mnLaneTotal,pp.speed);
+                    GetLaneOriTotal(pRoad,nlane,pp.mS,pp.mnLaneori,pp.mnLaneTotal,pp.speed,pp.mbNoavoid);
 
 
                     xvectorPP.push_back(pp);

+ 2 - 0
src/driver/driver_map_xodrload/globalplan.h

@@ -40,6 +40,8 @@ public:
     double mfSecy;
     int nlrchange; //1 left 2 right
     bool mbBoringRoad = false;
+    bool mbNoavoid = false;
+    double mfCurvature = 0.0;
 };
 
 class LaneChangePoint

+ 7 - 0
src/driver/driver_map_xodrload/gps_type.h

@@ -68,6 +68,13 @@ namespace iv {
         double gps_x_avoidright = 0;
         double gps_y_avoidright = 0;
 
+        bool mbnoavoid = false; //If true this point is no avoid.
+        double mfCurvature = 0.0;
+
+        char mcreserved[10];
+        int mnreserved[5];
+        double mfreserved[2];
+
 
 
     };

+ 7 - 0
src/driver/driver_map_xodrload/main.cpp

@@ -546,6 +546,13 @@ void SetPlan(xodrobj xo)
             data->roadSum = 2;
         }
 
+        data->mbnoavoid = xPlan[i].mbNoavoid;
+        if(data->mbnoavoid)
+        {
+            qDebug("no avoid i = %d",i);
+        }
+        data->mfCurvature = xPlan[i].mfCurvature;
+
         data->mode2 = xPlan[i].nSignal;
         if(data->mode2 == 3000)
         {

+ 80 - 66
src/driver/driver_radio_collision/gps_type.h

@@ -1,63 +1,62 @@
 #pragma once
 /*
-* GPS 惯导数据
+*GPS 惯导数据
 */
 #ifndef _IV_COMMON_GPS_TYPE_
 #define _IV_COMMON_GPS_TYPE_
 
 #include "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
+    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
 
         bool mbInLaneAvoid = false; //if true suport In Lane Avoid
         double gps_lat_avoidleft;
@@ -68,25 +67,40 @@ struct GPS_INS
         double gps_y_avoidleft = 0;
         double gps_x_avoidright = 0;
         double gps_y_avoidright = 0;
-};
 
-typedef boost::shared_ptr<iv::GPS_INS> GPSData;
-class Point2D
-{
-public:
-    double x = 0, y = 0, speed=0;
-    int v1 = 0, v2 = 0;
+        bool mbnoavoid = false; //If true this point is no avoid.
+        double mfCurvature = 0.0;
+
+        char mcreserved[10];
+        int mnreserved[5];
+        double mfreserved[2];
+
 
-    Point2D()
-    {
-        x = y = v1 = 0;
-    }
 
-    Point2D(double _x, double _y)
+    };
+
+    typedef boost::shared_ptr<iv::GPS_INS> GPSData;
+     class Point2D
     {
-        x = _x; y = _y;
-    }
-};
+      public:
+          double x = 0, y = 0, speed=0;
+         int v1 = 0, v2 = 0;
+
+         Point2D()
+        {
+            x = y = v1 = 0;
+        }
+
+         Point2D(double _x, double _y)
+        {
+            x = _x; y = _y;
+        }
+
+
+     };
+
+
+
 
 }
 #endif // !_IV_COMMON_GPS_TYPE_

+ 70 - 56
src/driver/driver_radio_p900/gps_type.h

@@ -1,63 +1,62 @@
 #pragma once
 /*
-* GPS 惯导数据
+*GPS 惯导数据
 */
 #ifndef _IV_COMMON_GPS_TYPE_
 #define _IV_COMMON_GPS_TYPE_
 
 #include "boost.h"
 namespace iv {
-struct GPS_INS
-{
-    int valid = 0xff;
-    int index = 0;	//gps点序号
-
-    double gps_lat = 0;//纬度
-    double gps_lng = 0;//经度
+    struct GPS_INS
+    {
+        int valid = 0xff;
+        int index = 0;	//gps点序号
 
-    double gps_x = 0;
-    double gps_y = 0;
-    double gps_z = 0;
+        double gps_lat = 0;//纬度
+        double gps_lng = 0;//经度
 
-    double ins_roll_angle = 0;	//横滚角 一般定义载体的右、前、上三个方向构成右手系,绕向前的轴旋转就是横滚角,绕向右的轴旋转就是俯仰角,绕向上的轴旋转就是航向角
-    double ins_pitch_angle = 0;	//俯仰角
-    double ins_heading_angle = 0;	//航向角
+        double gps_x = 0;
+        double gps_y = 0;
+        double gps_z = 0;
 
-    int ins_status = 0;	//惯导状态 4
-    int rtk_status = 0;	//rtk状态 6 -5 -3
-    int gps_satelites_num = 0;
+        double ins_roll_angle = 0;	//横滚角 一般定义载体的右、前、上三个方向构成右手系,绕向前的轴旋转就是横滚角,绕向右的轴旋转就是俯仰角,绕向上的轴旋转就是航向角
+        double ins_pitch_angle = 0;	//俯仰角
+        double ins_heading_angle = 0;	//航向角
 
-    //-----加速度--------------
-    double accel_x = 0;
-    double accel_y = 0;
-    double accel_z = 0;
+        int ins_status = 0;	//惯导状态 4
+        int rtk_status = 0;	//rtk状态 6 -5 -3
+        int gps_satelites_num = 0;
 
-    //-------角速度------------
-    double ang_rate_x = 0;
-    double ang_rate_y = 0;
-    double ang_rate_z = 0;
+        //-----加速度--------------
+        double accel_x = 0;
+        double accel_y = 0;
+        double accel_z = 0;
 
-    //-----------方向速度--------------
-    double vel_N = 0;
-    double vel_E = 0;
-    double vel_D = 0;
+        //-------角速度------------
+        double ang_rate_x = 0;
+        double ang_rate_y = 0;
+        double ang_rate_z = 0;
 
-    int speed_mode = 0;
-    int mode2 = 0;
-    double speed = 0;			//速度  若导航点则为导航预设速度  若为当前点则为当前车速
+        //-----------方向速度--------------
+        double vel_N = 0;
+        double vel_E = 0;
+        double vel_D = 0;
 
-    int roadMode;
-    int runMode;
-    int roadSum;
-    int roadOri;
+        int speed_mode = 0;
+        int mode2 = 0;
+        double speed = 0;			//速度  若导航点则为导航预设速度  若为当前点则为当前车速
 
-    double mfLaneWidth = 3.5; // Current Lane Width
+        int roadMode;
+        int runMode;
+        int roadSum;
+        int roadOri;
 
-    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
+        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
 
         bool mbInLaneAvoid = false; //if true suport In Lane Avoid
         double gps_lat_avoidleft;
@@ -68,25 +67,40 @@ struct GPS_INS
         double gps_y_avoidleft = 0;
         double gps_x_avoidright = 0;
         double gps_y_avoidright = 0;
-};
 
-typedef boost::shared_ptr<iv::GPS_INS> GPSData;
-class Point2D
-{
-public:
-    double x = 0, y = 0, speed=0;
-    int v1 = 0, v2 = 0;
+        bool mbnoavoid = false; //If true this point is no avoid.
+        double mfCurvature = 0.0;
+
+        char mcreserved[10];
+        int mnreserved[5];
+        double mfreserved[2];
 
-    Point2D()
-    {
-        x = y = v1 = 0;
-    }
 
-    Point2D(double _x, double _y)
+
+    };
+
+    typedef boost::shared_ptr<iv::GPS_INS> GPSData;
+     class Point2D
     {
-        x = _x; y = _y;
-    }
-};
+      public:
+          double x = 0, y = 0, speed=0;
+         int v1 = 0, v2 = 0;
+
+         Point2D()
+        {
+            x = y = v1 = 0;
+        }
+
+         Point2D(double _x, double _y)
+        {
+            x = _x; y = _y;
+        }
+
+
+     };
+
+
+
 
 }
 #endif // !_IV_COMMON_GPS_TYPE_

+ 61 - 54
src/tool/data_serials/gps_type.h

@@ -7,56 +7,56 @@
 
 #include "boost.h"
 namespace iv {
-struct GPS_INS
-{
-    int valid = 0xff;
-    int index = 0;	//gps点序号
+    struct GPS_INS
+    {
+        int valid = 0xff;
+        int index = 0;	//gps点序号
 
-    double gps_lat = 0;//纬度
-    double gps_lng = 0;//经度
+        double gps_lat = 0;//纬度
+        double gps_lng = 0;//经度
 
-    double gps_x = 0;
-    double gps_y = 0;
-    double gps_z = 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;	//航向角
+        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;
+        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 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 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;
+        //-----------方向速度--------------
+        double vel_N = 0;
+        double vel_E = 0;
+        double vel_D = 0;
 
-    int speed_mode = 0;
-    int mode2 = 0;
-    double speed = 0;			//速度  若导航点则为导航预设速度  若为当前点则为当前车速
+        int speed_mode = 0;
+        int mode2 = 0;
+        double speed = 0;			//速度  若导航点则为导航预设速度  若为当前点则为当前车速
 
-    int roadMode;
-    int runMode;
-    int roadSum;
-    int roadOri;
+        int roadMode;
+        int runMode;
+        int roadSum;
+        int roadOri;
 
-    double mfLaneWidth = 3.5; // Current Lane Width
+        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
+        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
 
         bool mbInLaneAvoid = false; //if true suport In Lane Avoid
         double gps_lat_avoidleft;
@@ -68,29 +68,36 @@ struct GPS_INS
         double gps_x_avoidright = 0;
         double gps_y_avoidright = 0;
 
+        bool mbnoavoid = false; //If true this point is no avoid.
+        double mfCurvature = 0.0;
 
+        char mcreserved[10];
+        int mnreserved[5];
+        double mfreserved[2];
 
-};
 
-typedef boost::shared_ptr<iv::GPS_INS> GPSData;
-class Point2D
-{
-public:
-    double x = 0, y = 0, speed=0;
-    int v1 = 0, v2 = 0;
 
-    Point2D()
-    {
-        x = y = v1 = 0;
-    }
+    };
 
-    Point2D(double _x, double _y)
+    typedef boost::shared_ptr<iv::GPS_INS> GPSData;
+     class Point2D
     {
-        x = _x; y = _y;
-    }
+      public:
+          double x = 0, y = 0, speed=0;
+         int v1 = 0, v2 = 0;
+
+         Point2D()
+        {
+            x = y = v1 = 0;
+        }
+
+         Point2D(double _x, double _y)
+        {
+            x = _x; y = _y;
+        }
 
 
-};
+     };
 
 
 

+ 13 - 7
src/tool/ivmapmake/common/gps_type.h

@@ -5,7 +5,7 @@
 #ifndef _IV_COMMON_GPS_TYPE_
 #define _IV_COMMON_GPS_TYPE_
 
-#include <common/boost.h>
+#include "boost.h"
 namespace iv {
     struct GPS_INS
     {
@@ -51,13 +51,12 @@ namespace iv {
         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
+        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
 
         bool mbInLaneAvoid = false; //if true suport In Lane Avoid
         double gps_lat_avoidleft;
@@ -69,6 +68,13 @@ namespace iv {
         double gps_x_avoidright = 0;
         double gps_y_avoidright = 0;
 
+        bool mbnoavoid = false; //If true this point is no avoid.
+        double mfCurvature = 0.0;
+
+        char mcreserved[10];
+        int mnreserved[5];
+        double mfreserved[2];
+
 
 
     };

+ 13 - 6
src/tool/ivmapmake_sharemem/common/gps_type.h

@@ -5,7 +5,7 @@
 #ifndef _IV_COMMON_GPS_TYPE_
 #define _IV_COMMON_GPS_TYPE_
 
-#include <common/boost.h>
+#include "boost.h"
 namespace iv {
     struct GPS_INS
     {
@@ -51,12 +51,12 @@ namespace iv {
         int roadSum;
         int roadOri;
 
-    double mfLaneWidth = 3.5; // Current Lane Width
+        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
+        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
 
         bool mbInLaneAvoid = false; //if true suport In Lane Avoid
         double gps_lat_avoidleft;
@@ -68,6 +68,13 @@ namespace iv {
         double gps_x_avoidright = 0;
         double gps_y_avoidright = 0;
 
+        bool mbnoavoid = false; //If true this point is no avoid.
+        double mfCurvature = 0.0;
+
+        char mcreserved[10];
+        int mnreserved[5];
+        double mfreserved[2];
+
 
 
     };

+ 12 - 5
src/tool/map_lanetoxodr/gps_type.h

@@ -51,12 +51,12 @@ namespace iv {
         int roadSum;
         int roadOri;
 
-    double mfLaneWidth = 3.5; // Current Lane Width
+        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
+        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
 
         bool mbInLaneAvoid = false; //if true suport In Lane Avoid
         double gps_lat_avoidleft;
@@ -68,6 +68,13 @@ namespace iv {
         double gps_x_avoidright = 0;
         double gps_y_avoidright = 0;
 
+        bool mbnoavoid = false; //If true this point is no avoid.
+        double mfCurvature = 0.0;
+
+        char mcreserved[10];
+        int mnreserved[5];
+        double mfreserved[2];
+
 
 
     };

+ 12 - 5
src/tool/map_lanetoxodr_graphscene/gps_type.h

@@ -51,12 +51,12 @@ namespace iv {
         int roadSum;
         int roadOri;
 
-    double mfLaneWidth = 3.5; // Current Lane Width
+        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
+        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
 
         bool mbInLaneAvoid = false; //if true suport In Lane Avoid
         double gps_lat_avoidleft;
@@ -68,6 +68,13 @@ namespace iv {
         double gps_x_avoidright = 0;
         double gps_y_avoidright = 0;
 
+        bool mbnoavoid = false; //If true this point is no avoid.
+        double mfCurvature = 0.0;
+
+        char mcreserved[10];
+        int mnreserved[5];
+        double mfreserved[2];
+
 
 
     };

+ 12 - 5
src/tool/tool_mapcreate/gps_type.h

@@ -51,12 +51,12 @@ namespace iv {
         int roadSum;
         int roadOri;
 
-    double mfLaneWidth = 3.5; // Current Lane Width
+        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
+        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
 
         bool mbInLaneAvoid = false; //if true suport In Lane Avoid
         double gps_lat_avoidleft;
@@ -68,6 +68,13 @@ namespace iv {
         double gps_x_avoidright = 0;
         double gps_y_avoidright = 0;
 
+        bool mbnoavoid = false; //If true this point is no avoid.
+        double mfCurvature = 0.0;
+
+        char mcreserved[10];
+        int mnreserved[5];
+        double mfreserved[2];
+
 
 
     };

+ 23 - 16
src/tool/tool_xodrobj/gps_type.h

@@ -51,22 +51,29 @@ namespace iv {
         int roadSum;
         int roadOri;
 
-    double mfLaneWidth = 3.5; // Current Road 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
-
-    bool mbInLaneAvoid = false; //if true suport In Lane Avoid
-    double gps_lat_avoidleft;
-    double gps_lng_avoidleft;
-    double gps_lat_avoidright;
-    double gps_lng_avoidright;
-    double gps_x_avoidleft = 0;
-    double gps_y_avoidleft = 0;
-    double gps_x_avoidright = 0;
-    double gps_y_avoidright = 0;
+        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
+
+        bool mbInLaneAvoid = false; //if true suport In Lane Avoid
+        double gps_lat_avoidleft;
+        double gps_lng_avoidleft;
+        double gps_lat_avoidright;
+        double gps_lng_avoidright;
+        double gps_x_avoidleft = 0;
+        double gps_y_avoidleft = 0;
+        double gps_x_avoidright = 0;
+        double gps_y_avoidright = 0;
+
+        bool mbnoavoid = false; //If true this point is no avoid.
+        double mfCurvature = 0.0;
+
+        char mcreserved[10];
+        int mnreserved[5];
+        double mfreserved[2];
 
 
 

+ 12 - 5
src/tool/tracetoxodr/gps_type.h

@@ -51,12 +51,12 @@ namespace iv {
         int roadSum;
         int roadOri;
 
-    double mfLaneWidth = 3.5; // Current Lane Width
+        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
+        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
 
         bool mbInLaneAvoid = false; //if true suport In Lane Avoid
         double gps_lat_avoidleft;
@@ -68,6 +68,13 @@ namespace iv {
         double gps_x_avoidright = 0;
         double gps_y_avoidright = 0;
 
+        bool mbnoavoid = false; //If true this point is no avoid.
+        double mfCurvature = 0.0;
+
+        char mcreserved[10];
+        int mnreserved[5];
+        double mfreserved[2];
+
 
 
     };

+ 24 - 0
src/ui/ADCIntelligentShow/adcintelligentshow.h

@@ -102,6 +102,30 @@ struct GPS_INS
         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
+
+        bool mbInLaneAvoid = false; //if true suport In Lane Avoid
+        double gps_lat_avoidleft;
+        double gps_lng_avoidleft;
+        double gps_lat_avoidright;
+        double gps_lng_avoidright;
+        double gps_x_avoidleft = 0;
+        double gps_y_avoidleft = 0;
+        double gps_x_avoidright = 0;
+        double gps_y_avoidright = 0;
+
+        bool mbnoavoid = false; //If true this point is no avoid.
+        double mfCurvature = 0.0;
+
+        char mcreserved[10];
+        int mnreserved[5];
+        double mfreserved[2];
+
     };
 
 class MyView : public QGraphicsView

+ 62 - 56
src/ui/ui_ads_hmi/common/gps_type.h

@@ -5,58 +5,58 @@
 #ifndef _IV_COMMON_GPS_TYPE_
 #define _IV_COMMON_GPS_TYPE_
 
-#include <common/boost.h>
+#include "boost.h"
 namespace iv {
-struct GPS_INS
-{
-    int valid = 0xff;
-    int index = 0;	//gps点序号
+    struct GPS_INS
+    {
+        int valid = 0xff;
+        int index = 0;	//gps点序号
 
-    double gps_lat = 0;//纬度
-    double gps_lng = 0;//经度
+        double gps_lat = 0;//纬度
+        double gps_lng = 0;//经度
 
-    double gps_x = 0;
-    double gps_y = 0;
-    double gps_z = 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;	//航向角
+        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;
+        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 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 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;
+        //-----------方向速度--------------
+        double vel_N = 0;
+        double vel_E = 0;
+        double vel_D = 0;
 
-    int speed_mode = 0;
-    int mode2 = 0;
-    double speed = 0;			//速度  若导航点则为导航预设速度  若为当前点则为当前车速
+        int speed_mode = 0;
+        int mode2 = 0;
+        double speed = 0;			//速度  若导航点则为导航预设速度  若为当前点则为当前车速
 
-    int roadMode;
-    int runMode;
-    int roadSum;
-    int roadOri;
+        int roadMode;
+        int runMode;
+        int roadSum;
+        int roadOri;
 
-    double mfLaneWidth = 3.5; // Current Lane Width
+        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
+        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
 
         bool mbInLaneAvoid = false; //if true suport In Lane Avoid
         double gps_lat_avoidleft;
@@ -68,30 +68,36 @@ struct GPS_INS
         double gps_x_avoidright = 0;
         double gps_y_avoidright = 0;
 
+        bool mbnoavoid = false; //If true this point is no avoid.
+        double mfCurvature = 0.0;
 
+        char mcreserved[10];
+        int mnreserved[5];
+        double mfreserved[2];
 
-};
 
-typedef boost::shared_ptr<iv::GPS_INS> GPSData;
-class Point2D
-{
-public:
-    double x = 0, y = 0, speed=0;
-    int v1 = 0, v2 = 0;
 
-    int roadMode = 0;
-    Point2D()
-    {
-        x = y = v1 = 0;
-    }
+    };
 
-    Point2D(double _x, double _y)
+    typedef boost::shared_ptr<iv::GPS_INS> GPSData;
+     class Point2D
     {
-        x = _x; y = _y;
-    }
+      public:
+          double x = 0, y = 0, speed=0;
+         int v1 = 0, v2 = 0;
+
+         Point2D()
+        {
+            x = y = v1 = 0;
+        }
+
+         Point2D(double _x, double _y)
+        {
+            x = _x; y = _y;
+        }
 
 
-};
+     };
 
 
 

+ 13 - 6
src/v2x/platform/common/gps_type.h

@@ -5,7 +5,7 @@
 #ifndef _IV_COMMON_GPS_TYPE_
 #define _IV_COMMON_GPS_TYPE_
 
-#include <common/boost.h>
+#include "boost.h"
 namespace iv {
     struct GPS_INS
     {
@@ -51,12 +51,12 @@ namespace iv {
         int roadSum;
         int roadOri;
 
-    double mfLaneWidth = 3.5; // Current Lane Width
+        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
+        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
 
         bool mbInLaneAvoid = false; //if true suport In Lane Avoid
         double gps_lat_avoidleft;
@@ -68,6 +68,13 @@ namespace iv {
         double gps_x_avoidright = 0;
         double gps_y_avoidright = 0;
 
+        bool mbnoavoid = false; //If true this point is no avoid.
+        double mfCurvature = 0.0;
+
+        char mcreserved[10];
+        int mnreserved[5];
+        double mfreserved[2];
+
 
 
     };

+ 106 - 141
src/v2x/v2xTcpClient/gps_type.h

@@ -1,141 +1,106 @@
-#pragma once
-/*
-*GPS 惯导数据
-*/
-#ifndef _IV_COMMON_GPS_TYPE_
-#define _IV_COMMON_GPS_TYPE_
-
-#include <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
-
-        bool mbInLaneAvoid = false; //if true suport In Lane Avoid
-        double gps_lat_avoidleft;
-        double gps_lng_avoidleft;
-        double gps_lat_avoidright;
-        double gps_lng_avoidright;
-        double gps_x_avoidleft = 0;
-        double gps_y_avoidleft = 0;
-        double gps_x_avoidright = 0;
-        double gps_y_avoidright = 0;
-
-
-
-    };
-
-//    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_
+#pragma once
+/*
+*GPS 惯导数据
+*/
+#ifndef _IV_COMMON_GPS_TYPE_
+#define _IV_COMMON_GPS_TYPE_
+
+#include "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
+
+        bool mbInLaneAvoid = false; //if true suport In Lane Avoid
+        double gps_lat_avoidleft;
+        double gps_lng_avoidleft;
+        double gps_lat_avoidright;
+        double gps_lng_avoidright;
+        double gps_x_avoidleft = 0;
+        double gps_y_avoidleft = 0;
+        double gps_x_avoidright = 0;
+        double gps_y_avoidright = 0;
+
+        bool mbnoavoid = false; //If true this point is no avoid.
+        double mfCurvature = 0.0;
+
+        char mcreserved[10];
+        int mnreserved[5];
+        double mfreserved[2];
+
+
+
+    };
+
+    typedef boost::shared_ptr<iv::GPS_INS> GPSData;
+     class Point2D
+    {
+      public:
+          double x = 0, y = 0, speed=0;
+         int v1 = 0, v2 = 0;
+
+         Point2D()
+        {
+            x = y = v1 = 0;
+        }
+
+         Point2D(double _x, double _y)
+        {
+            x = _x; y = _y;
+        }
+
+
+     };
+
+
+
+
+}
+#endif // !_IV_COMMON_GPS_TYPE_

+ 106 - 141
src/v2x/v2xTcpClientWL/gps_type.h

@@ -1,141 +1,106 @@
-#pragma once
-/*
-*GPS 惯导数据
-*/
-#ifndef _IV_COMMON_GPS_TYPE_
-#define _IV_COMMON_GPS_TYPE_
-
-#include <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
-
-        bool mbInLaneAvoid = false; //if true suport In Lane Avoid
-        double gps_lat_avoidleft;
-        double gps_lng_avoidleft;
-        double gps_lat_avoidright;
-        double gps_lng_avoidright;
-        double gps_x_avoidleft = 0;
-        double gps_y_avoidleft = 0;
-        double gps_x_avoidright = 0;
-        double gps_y_avoidright = 0;
-
-
-
-    };
-
-//    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_
+#pragma once
+/*
+*GPS 惯导数据
+*/
+#ifndef _IV_COMMON_GPS_TYPE_
+#define _IV_COMMON_GPS_TYPE_
+
+#include "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
+
+        bool mbInLaneAvoid = false; //if true suport In Lane Avoid
+        double gps_lat_avoidleft;
+        double gps_lng_avoidleft;
+        double gps_lat_avoidright;
+        double gps_lng_avoidright;
+        double gps_x_avoidleft = 0;
+        double gps_y_avoidleft = 0;
+        double gps_x_avoidright = 0;
+        double gps_y_avoidright = 0;
+
+        bool mbnoavoid = false; //If true this point is no avoid.
+        double mfCurvature = 0.0;
+
+        char mcreserved[10];
+        int mnreserved[5];
+        double mfreserved[2];
+
+
+
+    };
+
+    typedef boost::shared_ptr<iv::GPS_INS> GPSData;
+     class Point2D
+    {
+      public:
+          double x = 0, y = 0, speed=0;
+         int v1 = 0, v2 = 0;
+
+         Point2D()
+        {
+            x = y = v1 = 0;
+        }
+
+         Point2D(double _x, double _y)
+        {
+            x = _x; y = _y;
+        }
+
+
+     };
+
+
+
+
+}
+#endif // !_IV_COMMON_GPS_TYPE_