added activty plotting
added particle logging added gfx to tex
This commit is contained in:
@@ -101,6 +101,8 @@ public:
|
||||
return GridPoint(p.x, p.y, p.z);
|
||||
}
|
||||
|
||||
|
||||
|
||||
GroundTruthWay getGroundTruthWay(SensorReader& sr, const std::unordered_map<int, Point3>& waypoints, std::vector<int> ids) {
|
||||
|
||||
// construct the ground-truth-path by using all contained waypoint ids
|
||||
@@ -206,6 +208,9 @@ public:
|
||||
std::vector<float> errorsDistNorm;
|
||||
std::vector<float> errorsDistSmooth;
|
||||
|
||||
// acticity output
|
||||
std::vector<int> activity;
|
||||
|
||||
// number of updates to skip before starting the smoothing process
|
||||
const int skip = 35;
|
||||
|
||||
@@ -321,6 +326,7 @@ public:
|
||||
const float errDist = gtw.getMinDist(curEst); // minimum distance between estimation and ground-truth
|
||||
|
||||
|
||||
activity.push_back((int)actDet.getCurrentActivity());
|
||||
|
||||
// count number of transitions
|
||||
++cnt;
|
||||
@@ -355,6 +361,9 @@ public:
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//use and visualize the smoothed particle set
|
||||
const Point3 curSmoothedEst = estBF.pCur;
|
||||
|
||||
@@ -377,6 +386,7 @@ public:
|
||||
errorsSmooth.push_back(errSmoothed);
|
||||
errorsDistSmooth.push_back(errDistSmoothed);
|
||||
|
||||
|
||||
//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;
|
||||
|
||||
@@ -455,6 +465,12 @@ public:
|
||||
oError.close();
|
||||
}
|
||||
|
||||
{ // detailled activity over time
|
||||
std::ofstream oAct("/tmp/act_" + runName + ".dat");
|
||||
for (int i : activity) {oAct << i << "\n";}
|
||||
oAct.close();
|
||||
}
|
||||
|
||||
// plot
|
||||
//vis.clearStates();
|
||||
vis.gp.setTerminal("png", K::GnuplotSize(2560 * 2.54, 1440 * 2.54) );
|
||||
|
||||
Reference in New Issue
Block a user