added distance-time error logging
This commit is contained in:
@@ -203,6 +203,8 @@ public:
|
|||||||
// error per update-step
|
// error per update-step
|
||||||
std::vector<float> errorsNorm;
|
std::vector<float> errorsNorm;
|
||||||
std::vector<float> errorsSmooth;
|
std::vector<float> errorsSmooth;
|
||||||
|
std::vector<float> errorsDistNorm;
|
||||||
|
std::vector<float> errorsDistSmooth;
|
||||||
|
|
||||||
// number of updates to skip before starting the smoothing process
|
// number of updates to skip before starting the smoothing process
|
||||||
const int skip = 35;
|
const int skip = 35;
|
||||||
@@ -327,6 +329,7 @@ public:
|
|||||||
statsFiltering.add(err);
|
statsFiltering.add(err);
|
||||||
statsDistFiltering.add(errDist);
|
statsDistFiltering.add(errDist);
|
||||||
errorsNorm.push_back(err);
|
errorsNorm.push_back(err);
|
||||||
|
errorsDistNorm.push_back(errDist);
|
||||||
std::cout << "FilteringTime: " << se.ts << " " << statsFiltering.asString() << std::endl;
|
std::cout << "FilteringTime: " << se.ts << " " << statsFiltering.asString() << std::endl;
|
||||||
std::cout << "FilteringDist: " << se.ts << " " << statsDistFiltering.asString() << std::endl;
|
std::cout << "FilteringDist: " << se.ts << " " << statsDistFiltering.asString() << std::endl;
|
||||||
}
|
}
|
||||||
@@ -372,6 +375,7 @@ public:
|
|||||||
statsSmoothing.add(errSmoothed);
|
statsSmoothing.add(errSmoothed);
|
||||||
statsDistSmoothing.add(errDistSmoothed);
|
statsDistSmoothing.add(errDistSmoothed);
|
||||||
errorsSmooth.push_back(errSmoothed);
|
errorsSmooth.push_back(errSmoothed);
|
||||||
|
errorsDistSmooth.push_back(errDistSmoothed);
|
||||||
|
|
||||||
std::cout << "SmoothingTime: " << tsHistory[(tsHistory.size() - 1) - MiscSettings::lag] << " " << statsSmoothing.asString() << std::endl;
|
std::cout << "SmoothingTime: " << tsHistory[(tsHistory.size() - 1) - MiscSettings::lag] << " " << statsSmoothing.asString() << std::endl;
|
||||||
std::cout << "SmoothingDist: " << tsHistory[(tsHistory.size() - 1) - MiscSettings::lag] << " " << statsDistSmoothing.asString() << std::endl;
|
std::cout << "SmoothingDist: " << tsHistory[(tsHistory.size() - 1) - MiscSettings::lag] << " " << statsDistSmoothing.asString() << std::endl;
|
||||||
@@ -439,6 +443,18 @@ public:
|
|||||||
oError.close();
|
oError.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{ // detailled distance-error-description (normally filtered)
|
||||||
|
std::ofstream oError("/tmp/err_dist_norm_" + runName + ".dat");
|
||||||
|
for (float f : errorsDistNorm) {oError << f << "\n";}
|
||||||
|
oError.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
{ // detailled distance-error-description (smothed)
|
||||||
|
std::ofstream oError("/tmp/err_dist_smooth_" + runName + ".dat");
|
||||||
|
for (float f : errorsDistSmooth) {oError << f << "\n";}
|
||||||
|
oError.close();
|
||||||
|
}
|
||||||
|
|
||||||
// plot
|
// plot
|
||||||
//vis.clearStates();
|
//vis.clearStates();
|
||||||
vis.gp.setTerminal("png", K::GnuplotSize(1280 * 2.54, 720 * 2.54) );
|
vis.gp.setTerminal("png", K::GnuplotSize(1280 * 2.54, 720 * 2.54) );
|
||||||
@@ -528,11 +544,21 @@ public:
|
|||||||
|
|
||||||
oPlot.close();
|
oPlot.close();
|
||||||
|
|
||||||
std::ofstream oErrPlot("/tmp/plot_err_" + runName + ".gp");
|
{
|
||||||
oErrPlot << "plot \\\n";
|
std::ofstream oErrPlot("/tmp/plot_err_" + runName + ".gp");
|
||||||
oErrPlot << "'err_norm_" << runName << ".dat' with lines, \\\n";
|
oErrPlot << "plot \\\n";
|
||||||
oErrPlot << "'err_smooth_" << runName << ".dat' with lines";
|
oErrPlot << "'err_norm_" << runName << ".dat' with lines, \\\n";
|
||||||
oErrPlot.close();
|
oErrPlot << "'err_smooth_" << runName << ".dat' with lines";
|
||||||
|
oErrPlot.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
std::ofstream oErrPlot("/tmp/plot_dist_err_" + runName + ".gp");
|
||||||
|
oErrPlot << "plot \\\n";
|
||||||
|
oErrPlot << "'err_dist_norm_" << runName << ".dat' with lines, \\\n";
|
||||||
|
oErrPlot << "'err_dist_smooth_" << runName << ".dat' with lines";
|
||||||
|
oErrPlot.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user