Commit ce866287 authored by wangdawei's avatar wangdawei

test

parent 86d301a6
Pipeline #1542 failed with stages
...@@ -16,9 +16,9 @@ AdjustPPK::AdjustPPK(const string &ieBaseDir, const string &mapDir) ...@@ -16,9 +16,9 @@ AdjustPPK::AdjustPPK(const string &ieBaseDir, const string &mapDir)
LoadMapInfo(); LoadMapInfo();
CalLocalPose(); CalLocalPose();
CalPPKPeriod(); CalPPKPeriod();
std::ofstream ofs(ieBaseDir_ + "/CloudPredictPose.txt", ios::out); std::ofstream ofs("/home/juefx/wangdawei/CloudPredictPose.txt", ios::out);
ofs.close(); ofs.close();
ofs.open(ieBaseDir_ + "/LocalPPK.txt", ios::out); ofs.open("/home/juefx/wangdawei/LocalPPK.txt", ios::out);
ofs.close(); ofs.close();
Matrix4d m; Matrix4d m;
/////////////// cpt /////////////// /////////////// cpt ///////////////
...@@ -35,6 +35,7 @@ AdjustPPK::AdjustPPK(const string &ieBaseDir, const string &mapDir) ...@@ -35,6 +35,7 @@ AdjustPPK::AdjustPPK(const string &ieBaseDir, const string &mapDir)
void AdjustPPK::ConfigConvert(const string &firetimeFile, const string &correctionFile) void AdjustPPK::ConfigConvert(const string &firetimeFile, const string &correctionFile)
{ {
convert_.reset(new pandar_pointcloud::Convert(firetimeFile, correctionFile)); convert_.reset(new pandar_pointcloud::Convert(firetimeFile, correctionFile));
LOG(INFO) << "ConfigConvert done";
} }
void AdjustPPK::ReadBag(const string &bagPath) void AdjustPPK::ReadBag(const string &bagPath)
......
...@@ -200,8 +200,6 @@ Convert::Convert(const std::string &firetimeFile, const std::string &correctionF ...@@ -200,8 +200,6 @@ Convert::Convert(const std::string &firetimeFile, const std::string &correctionF
// boost::thread publishPointsThr( // boost::thread publishPointsThr(
// boost::bind(&Convert::publishPointsThread, this)); // boost::bind(&Convert::publishPointsThread, this));
init();
} }
bool Convert::processScan( bool Convert::processScan(
...@@ -592,6 +590,10 @@ void Convert::moveTaskEndToStartAngle() { ...@@ -592,6 +590,10 @@ void Convert::moveTaskEndToStartAngle() {
} }
void Convert::init() { void Convert::init() {
static bool inited = false;
if(inited){
return;
}
while (1) { while (1) {
if(!m_PacketsBuffer.hasEnoughPackets()) { if(!m_PacketsBuffer.hasEnoughPackets()) {
usleep(1000); usleep(1000);
...@@ -690,6 +692,7 @@ void Convert::init() { ...@@ -690,6 +692,7 @@ void Convert::init() {
m_OutMsgArray[1] = outMag1; m_OutMsgArray[1] = outMag1;
break; break;
} }
inited = true;
} }
void Convert::publishPoints() { void Convert::publishPoints() {
...@@ -1422,10 +1425,10 @@ bool Convert::processPacket(PPointCloud& pc) ...@@ -1422,10 +1425,10 @@ bool Convert::processPacket(PPointCloud& pc)
static int pktCount = 0; static int pktCount = 0;
static int cursor = 0; static int cursor = 0;
if (!m_PacketsBuffer.hasEnoughPackets()) { if (!m_PacketsBuffer.hasEnoughPackets()) {
usleep(1000); // usleep(1000);
return false; return false;
} }
init();
if (0 == checkLiadaMode()) { if (0 == checkLiadaMode()) {
// ROS_WARN("checkLiadaMode now!!"); // ROS_WARN("checkLiadaMode now!!");
m_OutMsgArray[cursor]->clear(); m_OutMsgArray[cursor]->clear();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment