|
@@ -84,11 +84,11 @@ MainWindow::MainWindow(QWidget *parent) :
|
|
|
|
|
|
ModuleFun funlidarObs =std::bind(&MainWindow::UpdateLidarObs,this,std::placeholders::_1, \
|
|
ModuleFun funlidarObs =std::bind(&MainWindow::UpdateLidarObs,this,std::placeholders::_1, \
|
|
std::placeholders::_2,std::placeholders::_3,std::placeholders::_4,std::placeholders::_5);
|
|
std::placeholders::_2,std::placeholders::_3,std::placeholders::_4,std::placeholders::_5);
|
|
- mpMemLidarObs = iv::modulecomm::RegisterRecvPlus("hcp2_gpsimu",funlidarObs);
|
|
|
|
|
|
+ mpMemLidarObs = iv::modulecomm::RegisterRecvPlus("lidar_track",funlidarObs);
|
|
|
|
|
|
ModuleFun funRadarObs =std::bind(&MainWindow::UpdateRadarObs,this,std::placeholders::_1, \
|
|
ModuleFun funRadarObs =std::bind(&MainWindow::UpdateRadarObs,this,std::placeholders::_1, \
|
|
std::placeholders::_2,std::placeholders::_3,std::placeholders::_4,std::placeholders::_5);
|
|
std::placeholders::_2,std::placeholders::_3,std::placeholders::_4,std::placeholders::_5);
|
|
- mpMemRadarObs = iv::modulecomm::RegisterRecvPlus("hcp2_gpsimu",funRadarObs);
|
|
|
|
|
|
+ mpMemRadarObs = iv::modulecomm::RegisterRecvPlus("radar",funRadarObs);
|
|
|
|
|
|
/* ShareMemory Register END */
|
|
/* ShareMemory Register END */
|
|
|
|
|
|
@@ -492,16 +492,17 @@ QString MainWindow::getObstacleData(int type)
|
|
if(type==0) {
|
|
if(type==0) {
|
|
for(i=0;i<miRadarObsCount;i++) {
|
|
for(i=0;i<miRadarObsCount;i++) {
|
|
obs=mqRadarObsInfo[i];
|
|
obs=mqRadarObsInfo[i];
|
|
- message += ",["+QString::number(obs.type)+","+QString::number(obs.lon)+","+QString::number(obs.lat)+"]";
|
|
|
|
|
|
+ message += ",["+QString::number(obs.type)+","+QString::number(obs.lon,'f',9)+","+QString::number(obs.lat,'f',9)+"]";
|
|
}
|
|
}
|
|
} else if(type==1) {
|
|
} else if(type==1) {
|
|
for(i=0;i<miLidarObsCount;i++) {
|
|
for(i=0;i<miLidarObsCount;i++) {
|
|
obs=mqLidarObsInfo[i];
|
|
obs=mqLidarObsInfo[i];
|
|
- message += ",["+QString::number(obs.type)+","+QString::number(obs.lon)+","+QString::number(obs.lat)+"]";
|
|
|
|
|
|
+ message += ",["+QString::number(obs.type)+","+QString::number(obs.lon,'f',9)+","+QString::number(obs.lat,'f',9)+"]";
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
ui->textEdit_messages->insertPlainText("ProcessError消息:Obstacle data type get error!!!\n");
|
|
ui->textEdit_messages->insertPlainText("ProcessError消息:Obstacle data type get error!!!\n");
|
|
}
|
|
}
|
|
|
|
+ ui->textEdit_messages->insertPlainText("Obstacle Message: "+message);
|
|
return message;
|
|
return message;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -532,7 +533,7 @@ void MainWindow::UpdateChassis(const char *strdata, const unsigned int nSize, co
|
|
if(xchassis.has_vel())
|
|
if(xchassis.has_vel())
|
|
mfspeed = xchassis.vel();
|
|
mfspeed = xchassis.vel();
|
|
if(xchassis.has_angle_feedback())
|
|
if(xchassis.has_angle_feedback())
|
|
- mfsteerAngle = xchassis.angle_feedback();
|
|
|
|
|
|
+ mfsteerAngle = xchassis.angle_feedback()/870.0*28;
|
|
if((xchassis.has_soc()))
|
|
if((xchassis.has_soc()))
|
|
{
|
|
{
|
|
miSOC = xchassis.soc();
|
|
miSOC = xchassis.soc();
|
|
@@ -612,8 +613,9 @@ void MainWindow::UpdateLidarObs(const char * strdata,const unsigned int nSize,co
|
|
{
|
|
{
|
|
x = lidarobjvec.obj(i).centroid().x();
|
|
x = lidarobjvec.obj(i).centroid().x();
|
|
y = lidarobjvec.obj(i).centroid().y();
|
|
y = lidarobjvec.obj(i).centroid().y();
|
|
|
|
+ GaussProjCal(mpdata.gps_lng, mpdata.gps_lat, &mpdata.gps_x, &mpdata.gps_y);
|
|
gps_ins = iv::decition::Coordinate_UnTransfer(x, y, mpdata);
|
|
gps_ins = iv::decition::Coordinate_UnTransfer(x, y, mpdata);
|
|
- GaussProjInvCal(gps_ins.gps_x, gps_ins.gps_y, &(gps_ins.gps_lng), &(gps_ins.gps_lat));
|
|
|
|
|
|
+ GaussProjInvCal(gps_ins.gps_x, gps_ins.gps_y, &gps_ins.gps_lng, &gps_ins.gps_lat);
|
|
xobsInfo.lat = gps_ins.gps_lat;
|
|
xobsInfo.lat = gps_ins.gps_lat;
|
|
xobsInfo.lon = gps_ins.gps_lng;
|
|
xobsInfo.lon = gps_ins.gps_lng;
|
|
std::string str = lidarobjvec.obj(i).type_name();
|
|
std::string str = lidarobjvec.obj(i).type_name();
|
|
@@ -645,6 +647,8 @@ void MainWindow::UpdateRadarObs(const char * strdata,const unsigned int nSize,co
|
|
oldrecvtime = QDateTime::currentMSecsSinceEpoch();
|
|
oldrecvtime = QDateTime::currentMSecsSinceEpoch();
|
|
|
|
|
|
miRadarObsCount = xradararray.obj_size();
|
|
miRadarObsCount = xradararray.obj_size();
|
|
|
|
+
|
|
|
|
+ givlog->verbose("radarobs count %ld",miRadarObsCount);
|
|
ObsInfo xobsInfo;
|
|
ObsInfo xobsInfo;
|
|
double x,y;
|
|
double x,y;
|
|
iv::GPS_INS gps_ins;
|
|
iv::GPS_INS gps_ins;
|
|
@@ -652,8 +656,9 @@ void MainWindow::UpdateRadarObs(const char * strdata,const unsigned int nSize,co
|
|
{
|
|
{
|
|
x = xradararray.obj(i).x();
|
|
x = xradararray.obj(i).x();
|
|
y = xradararray.obj(i).y();
|
|
y = xradararray.obj(i).y();
|
|
|
|
+ GaussProjCal(mpdata.gps_lng, mpdata.gps_lat, &mpdata.gps_x, &mpdata.gps_y);
|
|
gps_ins = iv::decition::Coordinate_UnTransfer(x, y, mpdata);
|
|
gps_ins = iv::decition::Coordinate_UnTransfer(x, y, mpdata);
|
|
- GaussProjInvCal(gps_ins.gps_x, gps_ins.gps_y, &(gps_ins.gps_lng), &(gps_ins.gps_lat));
|
|
|
|
|
|
+ GaussProjInvCal(gps_ins.gps_x, gps_ins.gps_y, &gps_ins.gps_lng, &gps_ins.gps_lat);
|
|
xobsInfo.lat = gps_ins.gps_lat;
|
|
xobsInfo.lat = gps_ins.gps_lat;
|
|
xobsInfo.lon = gps_ins.gps_lng;
|
|
xobsInfo.lon = gps_ins.gps_lng;
|
|
xobsInfo.type = 0;
|
|
xobsInfo.type = 0;
|
|
@@ -661,5 +666,5 @@ void MainWindow::UpdateRadarObs(const char * strdata,const unsigned int nSize,co
|
|
}
|
|
}
|
|
mistRadar = 0;
|
|
mistRadar = 0;
|
|
mistCanRadar = 0;
|
|
mistCanRadar = 0;
|
|
- mistLidar = 0;
|
|
|
|
|
|
+// mistLidar = 0;
|
|
}
|
|
}
|