Added all paths
This commit is contained in:
@@ -179,13 +179,13 @@ void exportFtmValues(Offline::FileReader& fr, Interpolator<uint64_t, Point3>& gt
|
||||
static float kalman_procNoiseDistStdDev = 1.2f; // standard deviation of distance for process noise
|
||||
static float kalman_procNoiseVelStdDev = 0.1f; // standard deviation of velocity for process noise
|
||||
|
||||
static Stats::Statistics<float> run(Settings::DataSetup setup, int numFile, std::string folder) {
|
||||
static Stats::Statistics<float> run(Settings::DataSetup setup, int walkIdx, std::string folder) {
|
||||
|
||||
// reading file
|
||||
std::string currDir = std::filesystem::current_path().string();
|
||||
|
||||
Floorplan::IndoorMap* map = Floorplan::Reader::readFromFile(setup.map);
|
||||
Offline::FileReader fr(setup.training[numFile]);
|
||||
Offline::FileReader fr(setup.training[walkIdx]);
|
||||
|
||||
// ground truth
|
||||
std::vector<int> gtPath = setup.gtPath;
|
||||
@@ -211,7 +211,7 @@ static Stats::Statistics<float> run(Settings::DataSetup setup, int numFile, std:
|
||||
}
|
||||
|
||||
std::ofstream errorFile;
|
||||
errorFile.open (evalDir.string() + "/" + std::to_string(numFile) + "_" + std::to_string(t) + ".csv");
|
||||
errorFile.open (evalDir.string() + "/" + std::to_string(walkIdx) + "_" + std::to_string(t) + ".csv");
|
||||
|
||||
|
||||
// wifi
|
||||
@@ -221,7 +221,7 @@ static Stats::Statistics<float> run(Settings::DataSetup setup, int numFile, std:
|
||||
kalmanMap->insert({ Settings::NUC3, Kalman(3, setup.NUCs.at(Settings::NUC3).kalman_measStdDev, kalman_procNoiseDistStdDev, kalman_procNoiseVelStdDev) });
|
||||
kalmanMap->insert({ Settings::NUC4, Kalman(4, setup.NUCs.at(Settings::NUC4).kalman_measStdDev, kalman_procNoiseDistStdDev, kalman_procNoiseVelStdDev) });
|
||||
|
||||
std::cout << "Optimal wifi parameters for " << setup.training[numFile] << "\n";
|
||||
std::cout << "Optimal wifi parameters for " << setup.training[walkIdx] << "\n";
|
||||
optimizeWifiParameters(fr, gtInterpolator);
|
||||
|
||||
// mesh
|
||||
@@ -397,6 +397,8 @@ static Stats::Statistics<float> run(Settings::DataSetup setup, int numFile, std:
|
||||
//dbg.setTimeInMinute(static_cast<int>(ts.sec()) / 60, static_cast<int>(static_cast<int>(ts.sec())%60));
|
||||
//dbg.draw();
|
||||
|
||||
//plot.printOverview("test");
|
||||
|
||||
plot.showParticles(pf.getParticles());
|
||||
plot.setCurEst(est.pos.pos);
|
||||
plot.setGroundTruth(gtPos);
|
||||
@@ -407,9 +409,10 @@ static Stats::Statistics<float> run(Settings::DataSetup setup, int numFile, std:
|
||||
//plot.splot.getView().setCamera(0, 0);
|
||||
//plot.splot.getView().setEqualXY(true);
|
||||
|
||||
plot.plot();
|
||||
// plot.plot();
|
||||
|
||||
|
||||
plot.plot();
|
||||
//plot.closeStream();
|
||||
//std::this_thread::sleep_for(500ms);
|
||||
|
||||
// error calc
|
||||
@@ -457,7 +460,7 @@ int main(int argc, char** argv)
|
||||
Stats::Statistics<float> tmp;
|
||||
|
||||
std::string evaluationName = "prologic/tmp";
|
||||
|
||||
|
||||
std::vector<std::array<float, 3>> error;
|
||||
std::ofstream error_out;
|
||||
error_out.open(Settings::errorDir + evaluationName + "_error_path1" + ".csv", std::ios_base::app);
|
||||
@@ -467,18 +470,26 @@ int main(int argc, char** argv)
|
||||
//{
|
||||
// for (kalman_procNoiseVelStdDev = 0.1f; kalman_procNoiseVelStdDev < 0.5f; kalman_procNoiseVelStdDev += 0.1f)
|
||||
// {
|
||||
for (int i = 0; i < 2; ++i) {
|
||||
|
||||
tmp = run(Settings::data.CurrentPath, 0, evaluationName);
|
||||
statsMedian.add(tmp.getMedian());
|
||||
statsAVG.add(tmp.getAvg());
|
||||
statsSTD.add(tmp.getStdDev());
|
||||
statsQuantil.add(tmp.getQuantile(0.75));
|
||||
for (size_t walkIdx = 0; walkIdx < 6; walkIdx++)
|
||||
{
|
||||
std::cout << "Executing walk " << walkIdx << "\n";
|
||||
for (int i = 0; i < 1; ++i)
|
||||
{
|
||||
std::cout << "Start of iteration " << i << "\n";
|
||||
|
||||
std::cout << kalman_procNoiseDistStdDev << " " << kalman_procNoiseVelStdDev << std::endl;
|
||||
std::cout << "Iteration " << i << " completed" << std::endl;
|
||||
tmp = run(Settings::data.CurrentPath, walkIdx, evaluationName);
|
||||
statsMedian.add(tmp.getMedian());
|
||||
statsAVG.add(tmp.getAvg());
|
||||
statsSTD.add(tmp.getStdDev());
|
||||
statsQuantil.add(tmp.getQuantile(0.75));
|
||||
|
||||
std::cout << kalman_procNoiseDistStdDev << " " << kalman_procNoiseVelStdDev << std::endl;
|
||||
std::cout << "Iteration " << i << " completed" << std::endl;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// error.push_back({{ kalman_procNoiseDistStdDev, kalman_procNoiseVelStdDev, statsAVG.getAvg() }});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user