|
@@ -87,7 +87,7 @@ void DataExchangeClient::dec_yaml(const char *stryamlpath)
|
|
|
strncpy(shmPicFront.mstrmsgname,strmsgname.data(),255);
|
|
|
shmPicFront.mnBufferSize = config["pic_front"]["buffersize"].as<int>();
|
|
|
shmPicFront.mnBufferCount = config["pic_front"]["buffercount"].as<int>();
|
|
|
-// std::cout << shmPicFront.mstrmsgname << shmPicFront.mnBufferSize << shmPicFront.mnBufferCount << std::endl;
|
|
|
+ std::cout << "pic_front:" << shmPicFront.mstrmsgname << "," << shmPicFront.mnBufferSize << "," << shmPicFront.mnBufferCount << std::endl;
|
|
|
}
|
|
|
}
|
|
|
else
|
|
@@ -106,7 +106,7 @@ void DataExchangeClient::dec_yaml(const char *stryamlpath)
|
|
|
strncpy(shmPicRear.mstrmsgname,strmsgname.data(),255);
|
|
|
shmPicRear.mnBufferSize = config["pic_rear"]["buffersize"].as<int>();
|
|
|
shmPicRear.mnBufferCount = config["pic_rear"]["buffercount"].as<int>();
|
|
|
-// std::cout << shmPicRear.mstrmsgname << shmPicRear.mnBufferSize << shmPicRear.mnBufferCount << std::endl;
|
|
|
+ std::cout << "pic_rear:" << shmPicRear.mstrmsgname << "," << shmPicRear.mnBufferSize << "," << shmPicRear.mnBufferCount << std::endl;
|
|
|
}
|
|
|
}
|
|
|
else
|
|
@@ -125,7 +125,7 @@ void DataExchangeClient::dec_yaml(const char *stryamlpath)
|
|
|
strncpy(shmPicLeft.mstrmsgname,strmsgname.data(),255);
|
|
|
shmPicLeft.mnBufferSize = config["pic_left"]["buffersize"].as<int>();
|
|
|
shmPicLeft.mnBufferCount = config["pic_left"]["buffercount"].as<int>();
|
|
|
-// std::cout << shmPicLeft.mstrmsgname << shmPicLeft.mnBufferSize << shmPicLeft.mnBufferCount << std::endl;
|
|
|
+ std::cout << "pic_left:" << shmPicLeft.mstrmsgname << "," << shmPicLeft.mnBufferSize << "," << shmPicLeft.mnBufferCount << std::endl;
|
|
|
}
|
|
|
}
|
|
|
else
|
|
@@ -144,7 +144,7 @@ void DataExchangeClient::dec_yaml(const char *stryamlpath)
|
|
|
strncpy(shmPicRight.mstrmsgname,strmsgname.data(),255);
|
|
|
shmPicRight.mnBufferSize = config["pic_right"]["buffersize"].as<int>();
|
|
|
shmPicRight.mnBufferCount = config["pic_right"]["buffercount"].as<int>();
|
|
|
-// std::cout << shmPicRight.mstrmsgname << shmPicRight.mnBufferSize << shmPicRight.mnBufferCount << std::endl;
|
|
|
+ std::cout << "pic_right:" << shmPicRight.mstrmsgname << "," << shmPicRight.mnBufferSize << "," << shmPicRight.mnBufferCount << std::endl;
|
|
|
}
|
|
|
}
|
|
|
else
|
|
@@ -163,7 +163,7 @@ void DataExchangeClient::dec_yaml(const char *stryamlpath)
|
|
|
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;
|
|
|
+ std::cout << "chassis:" << shmChassis.mstrmsgname << "," << shmChassis.mnBufferSize << "," << shmChassis.mnBufferCount << std::endl;
|
|
|
}
|
|
|
}
|
|
|
else
|
|
@@ -182,7 +182,7 @@ void DataExchangeClient::dec_yaml(const char *stryamlpath)
|
|
|
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;
|
|
|
+ std::cout << "platform_feedback:" << shmPlatformFeedback.mstrmsgname << "," << shmPlatformFeedback.mnBufferSize << "," << shmPlatformFeedback.mnBufferCount << std::endl;
|
|
|
}
|
|
|
}
|
|
|
else
|
|
@@ -201,7 +201,7 @@ void DataExchangeClient::dec_yaml(const char *stryamlpath)
|
|
|
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;
|
|
|
+ std::cout << "GPS_IMU:" << shmGPSIMU.mstrmsgname << "," << shmGPSIMU.mnBufferSize << "," << shmGPSIMU.mnBufferCount << std::endl;
|
|
|
}
|
|
|
}
|
|
|
else
|
|
@@ -448,7 +448,7 @@ std::string DataExchangeClient::uploadVehicleInfo(void)
|
|
|
// Act upon its status.
|
|
|
if (status.ok()) {
|
|
|
destinationPosition.CopyFrom(reply.destinationposition());
|
|
|
-// std::cout<<"lat:"<<destinationPosition.latitude()<<"lon:"<<destinationPosition.longitude()<<"height:"<<destinationPosition.height()<<std::endl;
|
|
|
+ std::cout<<"lat:"<<reply.destinationposition().latitude()<<"lon:"<<reply.destinationposition().longitude()<<"height:"<<reply.destinationposition().height()<<std::endl;
|
|
|
return "uploadVehicleInfo RPC successed";
|
|
|
} else {
|
|
|
std::cout << status.error_code() << ": " << status.error_message()
|
|
@@ -511,23 +511,23 @@ void DataExchangeClient::updateData(uint64_t timeInterval_ms)
|
|
|
{
|
|
|
id = gstrid;
|
|
|
timeStamp = QDateTime::currentMSecsSinceEpoch();
|
|
|
- SOC = 87.5;
|
|
|
- statusFeedback = VehicleStatus::STATUS_REMOTE;
|
|
|
+// SOC = 87.5;
|
|
|
+// statusFeedback = VehicleStatus::STATUS_REMOTE;
|
|
|
gMutex_GPSIMU.lock();
|
|
|
mileage += (speed * timeInterval_ms/1000.0)/1000.0; // kilometer
|
|
|
gMutex_GPSIMU.unlock();
|
|
|
- speed = 0.0; // 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;
|
|
|
+// speed = 0.0; // 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");
|
|
@@ -608,6 +608,7 @@ void DataExchangeClient::run()
|
|
|
{
|
|
|
QString strMileage = QString::number(mileage,'f',4);
|
|
|
mileageFile.write(strMileage.toUtf8());
|
|
|
+ std::cout<<"file not exist. mileage has been cleared. "<<mileage<<std::endl;
|
|
|
}
|
|
|
mileageFile.flush();
|
|
|
mileageFile.close();
|
|
@@ -644,7 +645,7 @@ void DataExchangeClient::patrolPOI_Recieved_Slot(std::string pathID)
|
|
|
{
|
|
|
std::cout<<"patrol path calculating"<<std::endl;
|
|
|
QFile mapfile;
|
|
|
- mapfile.setFileName("/home/samuel/Documents/path2.txt");
|
|
|
+ mapfile.setFileName("/home/nvidia/Documents/path2.txt");
|
|
|
QVector<org::jeecg::defsDetails::grpc::MapPoint> somePoints;
|
|
|
if(mapfile.open(QIODevice::ReadOnly | QIODevice::Text))
|
|
|
{
|