Переглянути джерело

fix(controller_midcar,grpc_BS,platformfeedback.proto):fix some spelling error and finish upload info

孙嘉城 3 роки тому
батько
коміт
4506c0fd06

+ 21 - 21
src/controller/controller_midcar/main.cpp

@@ -42,7 +42,7 @@ bool gbAutoDriving = true; //if true, Auto Driving, false, remote controll
 bool gbChassisEPS = true;
 
 iv::brain::decition gdecition_remote;
-iv::platformFeedback gPlateformFeedback;
+iv::platformFeedback gPlatformFeedback;
 
 qint64 gLastRemoteTime = 0;
 
@@ -73,23 +73,23 @@ void executeDecition(const iv::brain::decition decition)
 
     switch (decition.gear()) {
     case 0:
-        gPlateformFeedback.set_shift(3);  //0N 1D 2R 3P
+        gPlatformFeedback.set_shift(3);  //0N 1D 2R 3P
         break;
     case 1:
-        gPlateformFeedback.set_shift(1);  //0N 1D 2R 3P
+        gPlatformFeedback.set_shift(1);  //0N 1D 2R 3P
         break;
     case 2:
-        gPlateformFeedback.set_shift(2);  //0N 1D 2R 3P
+        gPlatformFeedback.set_shift(2);  //0N 1D 2R 3P
         break;
     case 3:
-        gPlateformFeedback.set_shift(0);  //0N 1D 2R 3P
+        gPlatformFeedback.set_shift(0);  //0N 1D 2R 3P
         break;
     default:
         break;
     }
-    gPlateformFeedback.set_throttle(decition.torque());
-    gPlateformFeedback.set_brake(decition.brake());
-    gPlateformFeedback.set_steeringwheelangle(decition.wheelangle());
+    gPlatformFeedback.set_throttle(decition.torque());
+    gPlatformFeedback.set_brake(decition.brake());
+    gPlatformFeedback.set_steeringwheelangle(decition.wheelangle());
 }
 
 
@@ -110,12 +110,12 @@ void ListenRemotectrl(const char * strdata,const unsigned int nSize,const unsign
     if(xrc.ntype() == iv::remotectrl_CtrlType_AUTO)
     {
         gbAutoDriving = true;
-        gPlateformFeedback.set_typefeedback(iv::platformFeedback::ctrlType::platformFeedback_ctrlType_AUTO);
+        gPlatformFeedback.set_typefeedback(iv::platformFeedback::ctrlType::platformFeedback_ctrlType_AUTO);
     }
     else if(xrc.ntype() == iv::remotectrl_CtrlType_STOP)
     {
         gbAutoDriving = false;
-        gPlateformFeedback.set_typefeedback(iv::platformFeedback::ctrlType::platformFeedback_ctrlType_STOP);
+        gPlatformFeedback.set_typefeedback(iv::platformFeedback::ctrlType::platformFeedback_ctrlType_STOP);
         xdecition.set_torque(0.0);
         xdecition.set_brake(100.0);
         xdecition.set_wheelangle(0.0);
@@ -136,7 +136,7 @@ void ListenRemotectrl(const char * strdata,const unsigned int nSize,const unsign
     else
     {
         gbAutoDriving = false;
-        gPlateformFeedback.set_typefeedback(iv::platformFeedback::ctrlType::platformFeedback_ctrlType_REMOTE);
+        gPlatformFeedback.set_typefeedback(iv::platformFeedback::ctrlType::platformFeedback_ctrlType_REMOTE);
         xdecition.set_torque(xrc.acc());
         xdecition.set_brake(xrc.brake());
         xdecition.set_wheelangle(xrc.wheel()*5.5f);
@@ -208,15 +208,15 @@ void ExecSend()
         std::cout<<"MainWindow::onTimer serialize error."<<std::endl;
     }
 
-    int ndatasize = gPlateformFeedback.ByteSize();
-    char * str = new char[ndatasize];
-    std::shared_ptr<char> pstr;pstr.reset(str);
-    if(!gPlateformFeedback.SerializeToArray(str,ndatasize))
+    int ndatasize_pf = gPlatformFeedback.ByteSize();
+    char * str_pf = new char[ndatasize_pf];
+    std::shared_ptr<char> pstr;pstr.reset(str_pf);
+    if(!gPlatformFeedback.SerializeToArray(str_pf,ndatasize_pf))
     {
         std::cout<<"MainWindow::on_horizontalSlider_valueChanged serialize error."<<std::endl;
         return;
     }
-    iv::modulecomm::ModuleSendMsg(gpaPaltformFeedback,str,ndatasize);
+    iv::modulecomm::ModuleSendMsg(gpaPaltformFeedback,str_pf,ndatasize_pf);
 }
 
 
@@ -276,11 +276,11 @@ int main(int argc, char *argv[])
     gdecition_def.set_torque(0);
     gdecition_def.set_speed(105);
 
-    gPlateformFeedback.set_typefeedback(iv::platformFeedback::ctrlType::platformFeedback_ctrlType_AUTO);
-    gPlateformFeedback.set_shift(3);
-    gPlateformFeedback.set_throttle(0.0);
-    gPlateformFeedback.set_brake(0.0);
-    gPlateformFeedback.set_steeringwheelangle(0.0);
+    gPlatformFeedback.set_typefeedback(iv::platformFeedback::ctrlType::platformFeedback_ctrlType_AUTO);
+    gPlatformFeedback.set_shift(3);
+    gPlatformFeedback.set_throttle(0.0);
+    gPlatformFeedback.set_brake(0.0);
+    gPlatformFeedback.set_steeringwheelangle(0.0);
 
     gTime.start();
 

+ 0 - 2
src/driver/driver_cloud_grpc_client_BS/driver_cloud_grpc_client_BS.pro

@@ -35,7 +35,6 @@ SOURCES += \
         vehicle_upload.cpp \
         ../../include/msgtype/remotectrl.pb.cc \
         ../../include/msgtype/chassis.pb.cc \
-        ../../include/msgtype/brainstate.pb.cc \
         ../../include/msgtype/gpsimu.pb.cc \
         ../../include/msgtype/platform_feedback.pb.cc \
         ../../include/msgtype/rawpic.pb.cc
@@ -86,7 +85,6 @@ HEADERS += \
         vehicle_upload.h \
         ../../include/msgtype/remotectrl.pb.h \
         ../../include/msgtype/chassis.pb.h \
-        ../../include/msgtype/brainstate.pb.h \
         ../../include/msgtype/gpsimu.pb.h \
         ../../include/msgtype/platform_feedback.pb.h \
         ../../include/msgtype/rawpic.pb.h

+ 12 - 0
src/driver/driver_cloud_grpc_client_BS/driver_cloud_grpc_client_BS.yaml

@@ -31,3 +31,15 @@ remote_ctrl:
   msgname: remotectrl
   buffersize: 10000
   buffercount: 1
+chassis:
+  msgname: chassis
+  buffersize: 10000
+  buffercount: 1
+platform_feedback:
+  msgname: platformFeedback
+  buffersize: 10000
+  buffercount: 1
+GPS_IMU:
+  msgname: hcp2_gpsimu
+  buffersize: 10000
+  buffercount: 1

+ 41 - 1
src/driver/driver_cloud_grpc_client_BS/main.cpp

@@ -28,7 +28,8 @@ struct msgunit
 };
 }
 
-uint8_t gShift_Status = 3;//3 p 4 r 5 n 6 d
+uint8_t gShift_Status = 3; //3 p 4 r 5 n 6 d
+uint8_t gCtrlMode_Status = 0; //0 auto 1 remote 2 stop 3 platform
 
 std::string gstrserverip =  "111.33.136.150";//"123.57.212.138";
 std::string gstruploadPort = "10591";//"9000";
@@ -46,6 +47,9 @@ iv::msgunit shmPicRear;
 iv::msgunit shmPicLeft;
 iv::msgunit shmPicRight;
 iv::msgunit shmRemoteCtrl;
+iv::msgunit shmChassis;
+iv::msgunit shmGPSIMU;
+iv::msgunit shmPlatformFeedback;
 
 void dec_yaml(const char * stryamlpath)
 {
@@ -172,6 +176,42 @@ void dec_yaml(const char * stryamlpath)
         }
     }
 
+    if(config["chassis"])
+    {
+        if(config["chassis"]["msgname"]&&config["chassis"]["buffersize"]&&config["chassis"]["buffercount"])
+        {
+            strmsgname = config["chassis"]["msgname"].as<std::string>();
+            strncpy(shmChassis.mstrmsgname,strmsgname.data(),255);
+            shmChassis.mnBufferSize = config["chassis"]["buffersize"].as<int>();
+            shmChassis.mnBufferCount = config["chassis"]["buffercount"].as<int>();
+//            std::cout << shmChassis.mstrmsgname << shmChassis.mnBufferSize << shmChassis.mnBufferCount << std::endl;
+        }
+    }
+
+    if(config["platform_feedback"])
+    {
+        if(config["platform_feedback"]["msgname"]&&config["platform_feedback"]["buffersize"]&&config["platform_feedback"]["buffercount"])
+        {
+            strmsgname = config["platform_feedback"]["msgname"].as<std::string>();
+            strncpy(shmPlatformFeedback.mstrmsgname,strmsgname.data(),255);
+            shmPlatformFeedback.mnBufferSize = config["platform_feedback"]["buffersize"].as<int>();
+            shmPlatformFeedback.mnBufferCount = config["platform_feedback"]["buffercount"].as<int>();
+//            std::cout << shmPlatformFeedback.mstrmsgname << shmPlatformFeedback.mnBufferSize << shmPlatformFeedback.mnBufferCount << std::endl;
+        }
+    }
+
+    if(config["GPS_IMU"])
+    {
+        if(config["GPS_IMU"]["msgname"]&&config["GPS_IMU"]["buffersize"]&&config["GPS_IMU"]["buffercount"])
+        {
+            strmsgname = config["GPS_IMU"]["msgname"].as<std::string>();
+            strncpy(shmGPSIMU.mstrmsgname,strmsgname.data(),255);
+            shmGPSIMU.mnBufferSize = config["GPS_IMU"]["buffersize"].as<int>();
+            shmGPSIMU.mnBufferCount = config["GPS_IMU"]["buffercount"].as<int>();
+//            std::cout << shmGPSIMU.mstrmsgname << shmGPSIMU.mnBufferSize << shmGPSIMU.mnBufferCount << std::endl;
+        }
+    }
+
     return;
 }
 

+ 6 - 4
src/driver/driver_cloud_grpc_client_BS/vehicle_control.cpp

@@ -10,7 +10,8 @@ extern std::string gstruploadMapInterval;
 extern std::string gstrid;
 extern std::string gstrplateNumber;
 
-extern uint8_t gShift_Status;//3 p 4 r 5 n 6 d
+extern uint8_t gShift_Status; //3 p 4 r 5 n 6 d
+extern uint8_t gCtrlMode_Status; //0 auto 1 remote 2 stop 3 platform
 
 namespace iv {
 struct msgunit
@@ -140,14 +141,14 @@ void VehicleControlClient::updateControlData(void)
         xmsg.set_acc(0.0);
         xmsg.set_brake(0.0);
         xmsg.set_wheel(0.0);
-        xmsg.set_shift(0);
+        xmsg.set_shift(0); //real shift decided by controller
     }
-    else
+    else // CMD_STOP
     {
         xmsg.set_acc(0.0);
         xmsg.set_brake(100.0);
         xmsg.set_wheel(0.0);
-        xmsg.set_shift(0);
+        xmsg.set_shift(0); //real shift decided by controller
     }
 
     int ndatasize = xmsg.ByteSize();
@@ -236,6 +237,7 @@ std::string VehicleChangeCtrlModeClient::changeCtrlMode(void)
 void VehicleChangeCtrlModeClient::updateCtrolMode(void)
 {
 //    std::cout<<"modeCMD:"<<modeCMD<<std::endl;
+    gCtrlMode_Status = modeCMD;
     emit ctrlMode_Changed(modeCMD);
 }
 

+ 153 - 22
src/driver/driver_cloud_grpc_client_BS/vehicle_upload.cpp

@@ -3,11 +3,12 @@
 #include <QFile>
 #include <QString>
 #include <QStringList>
+#include <math.h>
 
 #include "modulecomm.h"
 #include "rawpic.pb.h"
 #include "chassis.pb.h"
-#include "brainstate.pb.h"
+#include "platform_feedback.pb.h"
 #include "gpsimu.pb.h"
 
 extern std::string gstrserverip;
@@ -17,6 +18,7 @@ extern std::string gstrid;
 extern std::string gstrplateNumber;
 
 extern uint8_t gShift_Status;//3 p 4 r 5 n 6 d
+extern uint8_t gCtrlMode_Status; //0 auto 1 remote 2 stop 3 platform
 
 namespace iv {
 struct msgunit
@@ -37,6 +39,9 @@ extern iv::msgunit shmPicFront;
 extern iv::msgunit shmPicRear;
 extern iv::msgunit shmPicLeft;
 extern iv::msgunit shmPicRight;
+extern iv::msgunit shmChassis;
+extern iv::msgunit shmGPSIMU;
+extern iv::msgunit shmPlatformFeedback;
 
 using org::jeecg::defsDetails::grpc::Empty; ///< other message
 using org::jeecg::defsDetails::grpc::GPSPoint;
@@ -67,6 +72,21 @@ void ListenRightData(const char * strdata,const unsigned int nSize,const unsigne
     gDataExchangeClient->ListenRightPicMsg(strdata,nSize);
 }
 
+void ListenChassisData(const char * strdata,const unsigned int nSize,const unsigned int index,const QDateTime * dt,const char * strmemname)
+{
+    gDataExchangeClient->ListenChassisMsg(strdata,nSize);
+}
+
+void ListenGPSIMUData(const char * strdata,const unsigned int nSize,const unsigned int index,const QDateTime * dt,const char * strmemname)
+{
+    gDataExchangeClient->ListenGPSIMUMsg(strdata,nSize);
+}
+
+void ListenPlatformFeedbackData(const char * strdata,const unsigned int nSize,const unsigned int index,const QDateTime * dt,const char * strmemname)
+{
+    gDataExchangeClient->ListenPlatformFeedbackMsg(strdata,nSize);
+}
+
 DataExchangeClient::DataExchangeClient(std::shared_ptr<Channel> channel)
 {
     gDataExchangeClient = this;
@@ -77,6 +97,9 @@ DataExchangeClient::DataExchangeClient(std::shared_ptr<Channel> channel)
     shmPicRear.mpa = iv::modulecomm::RegisterRecv(shmPicRear.mstrmsgname,ListenRearData);
     shmPicLeft.mpa = iv::modulecomm::RegisterRecv(shmPicLeft.mstrmsgname,ListenLeftData);
     shmPicRight.mpa = iv::modulecomm::RegisterRecv(shmPicRight.mstrmsgname,ListenRightData);
+    shmChassis.mpa = iv::modulecomm::RegisterRecv(shmChassis.mstrmsgname,ListenChassisData);
+    shmGPSIMU.mpa = iv::modulecomm::RegisterRecv(shmGPSIMU.mstrmsgname,ListenGPSIMUData);
+    shmPlatformFeedback.mpa = iv::modulecomm::RegisterRecv(shmPlatformFeedback.mstrmsgname,ListenPlatformFeedbackData);
 }
 
 DataExchangeClient::~DataExchangeClient(void)
@@ -144,6 +167,101 @@ void DataExchangeClient::ListenRightPicMsg(const char * strdata,const unsigned i
     gMutex_ImageRight.unlock();
 }
 
+void DataExchangeClient::ListenChassisMsg(const char * strdata,const unsigned int nSize) // need a lock
+{
+    iv::chassis xdata;
+    if(!xdata.ParseFromArray(strdata,nSize))
+    {
+        std::cout<<" MainWindow::UpdateSlider parese error."<<std::endl;
+        return;
+    }
+
+    gMutex_Chassis.lock();
+    SOC = xdata.soc();
+    gMutex_Chassis.unlock();
+}
+
+void DataExchangeClient::ListenGPSIMUMsg(const char * strdata,const unsigned int nSize) // need a lock
+{
+    iv::gps::gpsimu xdata;
+    if(!xdata.ParseFromArray(strdata,nSize))
+    {
+        std::cout<<" MainWindow::UpdateSlider parese error."<<std::endl;
+        return;
+    }
+
+    double GPS_Speed = sqrt(xdata.ve()*xdata.ve()+xdata.vd()*xdata.vd()+xdata.vn()*xdata.vn());
+
+    gMutex_GPSIMU.lock();
+    GPSRTKStatus = xdata.rtk_state();
+    positionFeedback.set_latitude(xdata.lat());
+    positionFeedback.set_longitude(xdata.lon());
+    positionFeedback.set_height(xdata.height());
+    pitch = xdata.pitch();
+    roll = xdata.roll();
+    heading = xdata.heading();
+    speed = GPS_Speed;
+    gMutex_GPSIMU.unlock();
+}
+
+void DataExchangeClient::ListenPlatformFeedbackMsg(const char * strdata,const unsigned int nSize) // need a lock
+{
+    iv::platformFeedback xdata;
+    if(!xdata.ParseFromArray(strdata,nSize))
+    {
+        std::cout<<" MainWindow::UpdateSlider parese error."<<std::endl;
+        return;
+    }
+
+    gMutex_PlatformFeedback.lock();
+    switch (xdata.typefeedback()) {
+    case iv::platformFeedback::ctrlType::platformFeedback_ctrlType_AUTO:
+        statusFeedback = VehicleStatus::STATUS_AUTO;
+        modeFeedback = CtrlMode::CMD_AUTO;
+        break;
+    case iv::platformFeedback::ctrlType::platformFeedback_ctrlType_REMOTE:
+        if(gCtrlMode_Status == 1) //remote
+        {
+            statusFeedback = VehicleStatus::STATUS_REMOTE;
+            modeFeedback = CtrlMode::CMD_REMOTE;
+        }
+        else if(gCtrlMode_Status == 3) //platform
+        {
+            statusFeedback = VehicleStatus::STATUS_REMOTE;
+            modeFeedback = CtrlMode::CMD_CLOUD_PLATFORM;
+        }
+        break;
+    case iv::platformFeedback::ctrlType::platformFeedback_ctrlType_STOP:
+        statusFeedback = VehicleStatus::STATUS_EMERGENCY_STOP;
+        modeFeedback = CtrlMode::CMD_EMERGENCY_STOP;
+        break;
+    default:
+        break;
+    }
+
+    switch (xdata.shift()) {
+    case 0: //0N 1D 2R 3P
+        shiftFeedback = ShiftStatus::SHIFT_NEUTRAL;
+        break;
+    case 1: //0N 1D 2R 3P
+        shiftFeedback = ShiftStatus::SHIFT_DRIVE;
+        break;
+    case 2: //0N 1D 2R 3P
+        shiftFeedback = ShiftStatus::SHIFT_REVERSE;
+        break;
+    case 3: //0N 1D 2R 3P
+        shiftFeedback = ShiftStatus::SHIFT_PARKING;
+        break;
+    default:
+        break;
+    }
+
+    throttleFeedback = xdata.throttle();
+    brakeFeedback = xdata.brake();
+    steeringWheelAngleFeedback = xdata.steeringwheelangle();
+    gMutex_PlatformFeedback.unlock();
+}
+
 std::string DataExchangeClient::uploadVehicleInfo(void)
 {
 
@@ -151,19 +269,30 @@ std::string DataExchangeClient::uploadVehicleInfo(void)
     UplinkRequest request;
     request.set_id(id);
     request.set_timestamp(timeStamp);
+
+    gMutex_Chassis.lock();
     request.set_soc(SOC);
+    gMutex_Chassis.unlock();
+
+    gMutex_PlatformFeedback.lock();
     request.set_statusfeedback(statusFeedback);
-    request.set_mileage(mileage);
-    request.set_speed(speed);
+    request.set_modefeedback(modeFeedback);
     request.set_shiftfeedback(shiftFeedback);
     request.set_steeringwheelanglefeedback(steeringWheelAngleFeedback);
     request.set_throttlefeedback(throttleFeedback);
     request.set_brakefeedback(brakeFeedback);
+    gMutex_PlatformFeedback.unlock();
+
+    gMutex_GPSIMU.lock();
+    request.set_mileage(mileage);
+    request.set_speed(speed);
     request.set_gpsrtkstatus(GPSRTKStatus);
     request.mutable_positionfeedback()->CopyFrom(positionFeedback);
     request.set_pitch(pitch);
     request.set_roll(roll);
     request.set_heading(heading);
+    gMutex_GPSIMU.unlock();
+
     gMutex_ImageFront.lock();
     request.set_cameraimagefront(cameraImageFront.data(),cameraImageFront.size());
     gMutex_ImageFront.unlock();
@@ -176,6 +305,7 @@ std::string DataExchangeClient::uploadVehicleInfo(void)
     gMutex_ImageRight.lock();
     request.set_cameraimageright(cameraImageRight.data(),cameraImageRight.size());
     gMutex_ImageRight.unlock();
+
     request.set_sensorstatusgpsimu(sensorStatusGPSIMU);
     request.set_sensorstatuslidar(sensorStatusLidar);
     request.set_sensorstatusradar(sensorStatusRadar);
@@ -185,7 +315,6 @@ std::string DataExchangeClient::uploadVehicleInfo(void)
     request.set_sensorstatuscamright(sensorStatusCamRight);
     request.set_isarrived(isArrived);
     request.set_platenumber(plateNumber);
-    request.set_modefeedback(modeFeedback);
 
     // Container for the data we expect from the server.
     ResponseMessage reply;
@@ -264,25 +393,27 @@ std::string DataExchangeClient::uploadPath(void)
     }
 }
 
-void DataExchangeClient::updateData(void)
+void DataExchangeClient::updateData(uint64_t timeInterval_ms)
 {
     id = gstrid;
     timeStamp = QDateTime::currentMSecsSinceEpoch();
-    SOC = 87.5;
-    statusFeedback = VehicleStatus::STATUS_REMOTE;
-    mileage = 123.45; // kilometer
-    speed = 0.1; // m/s
-    shiftFeedback = ShiftStatus::SHIFT_DRIVE;
-    steeringWheelAngleFeedback = 1.23; //+/-540 degree
-    throttleFeedback = 0.12;
-    brakeFeedback = 0.34;
-    GPSRTKStatus = 6; //GPS-RTK status 0-6 6 is best
-    positionFeedback.set_latitude(39.0666552);
-    positionFeedback.set_longitude(117.3540963);
-    positionFeedback.set_height(0.84);
-    pitch = 0.03;
-    roll = 0.02;
-    heading = 198.4;
+//    SOC = 87.5;
+//    statusFeedback = VehicleStatus::STATUS_REMOTE;
+    gMutex_GPSIMU.lock();
+    mileage += (speed * timeInterval_ms/1000.0)/1000.0; // kilometer
+    gMutex_GPSIMU.unlock();
+//    speed = 0.1; // m/s
+//    shiftFeedback = ShiftStatus::SHIFT_DRIVE;
+//    steeringWheelAngleFeedback = 1.23; //+/-540 degree
+//    throttleFeedback = 0.12;
+//    brakeFeedback = 0.34;
+//    GPSRTKStatus = 6; //GPS-RTK status 0-6 6 is best
+//    positionFeedback.set_latitude(39.0666552);
+//    positionFeedback.set_longitude(117.3540963);
+//    positionFeedback.set_height(0.84);
+//    pitch = 0.03;
+//    roll = 0.02;
+//    heading = 198.4;
 
 //    QFile xFile;
 //    xFile.setFileName("/home/nvidia/Pictures/123.jpg");
@@ -325,7 +456,7 @@ void DataExchangeClient::updateData(void)
 
     plateNumber = gstrplateNumber;
 
-    modeFeedback = CtrlMode::CMD_REMOTE; //mode Feedback
+//    modeFeedback = CtrlMode::CMD_REMOTE; //mode Feedback
 }
 
 void DataExchangeClient::updatePath(std::string pathID, QVector<MapPoint> points)
@@ -374,7 +505,7 @@ void DataExchangeClient::run()
     {
         if((xTime.elapsed() - lastTime)>=interval)
         {
-            updateData();
+            updateData(xTime.elapsed() - lastTime);
             std::string reply = uploadVehicleInfo();
             std::cout<< reply <<std::endl;
             lastTime = xTime.elapsed();

+ 8 - 1
src/driver/driver_cloud_grpc_client_BS/vehicle_upload.h

@@ -39,13 +39,16 @@ public:
 
     std::string uploadVehicleInfo(void);
     std::string uploadPath(void);
-    void updateData(void);
+    void updateData(uint64_t timeInterval_ms);
     void updatePath(std::string pathID,QVector<org::jeecg::defsDetails::grpc::MapPoint> points);
 
     void ListenFrontPicMsg(const char * strdata,const unsigned int nSize);
     void ListenRearPicMsg(const char * strdata,const unsigned int nSize);
     void ListenLeftPicMsg(const char * strdata,const unsigned int nSize);
     void ListenRightPicMsg(const char * strdata,const unsigned int nSize);
+    void ListenChassisMsg(const char * strdata,const unsigned int nSize);
+    void ListenGPSIMUMsg(const char * strdata,const unsigned int nSize);
+    void ListenPlatformFeedbackMsg(const char * strdata,const unsigned int nSize);
 
 protected:
     void run();
@@ -70,6 +73,10 @@ private:
     double roll;
     double heading;
 
+    QMutex gMutex_Chassis;
+    QMutex gMutex_GPSIMU;
+    QMutex gMutex_PlatformFeedback;
+
     QByteArray cameraImageFront;
     QMutex gMutex_ImageFront;
     QByteArray cameraImageRear;

+ 1 - 1
src/include/proto/platform_feedback.proto

@@ -17,4 +17,4 @@ message platformFeedback
   optional double steeringWheelAngle = 5; //-550 to +550
 }
 
-//message trans direction: controller -> plateform client
+//message trans direction: controller -> platform client