commit for the laaaaadyyyys

This commit is contained in:
toni
2017-04-05 11:38:02 +02:00
parent a71f082a45
commit c7691a81f0
2 changed files with 31 additions and 14 deletions

View File

@@ -7,9 +7,9 @@
namespace Settings {
const bool useKLB = true;
bool useKLB = true;
const int numParticles = 10000;
const int numParticles = 5000;
namespace IMU {
const float turnSigma = 2.5; // 3.5
@@ -97,7 +97,7 @@ namespace Settings {
}
namespace Paths_IPIN2017 {
const std::vector<int> path1 = {0, 1, 2, 3, 4, 5, 6, 700, 7, 8, 9, 10};
const std::vector<int> path1 = {0, 1, 2, 3, 4, 5, 6, 700, 7, 9, 10};
const std::vector<int> path2 = {11, 12, 3, 2, 1, 0, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 11};
const std::vector<int> path3 = {31, 32, 33, 34, 35, 36, 37, 38};
}

View File

@@ -6,6 +6,9 @@
#include "filter/Logic.h"
#include "Settings.h"
#include <sys/types.h>
#include <sys/stat.h>
//frank
//const std::string mapDir = "/mnt/data/workspaces/IPIN2016/IPIN2016/competition/maps/";
@@ -203,9 +206,14 @@ void run(DataSetup setup, int numFile, std::string folder, std::vector<int> gtPa
//file writing for error data
long int t = static_cast<long int>(time(NULL));
const long int t = static_cast<long int>(time(NULL));
const std::string evalDir = errorDir + std::to_string(t);
if(mkdir(evalDir.c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH) == -1){
Assert::doThrow("Eval folder couldn't be created!");
}
std::ofstream errorFile;
errorFile.open (errorDir + folder + "/error_" + std::to_string(numFile) + "_" + std::to_string(t) + ".csv");
errorFile.open (evalDir + "/" + std::to_string(numFile) + "_" + std::to_string(t) + ".csv");
// parse each sensor-value within the offline data
for (const Offline::Entry& e : fr.getEntries()) {
@@ -346,18 +354,18 @@ void run(DataSetup setup, int numFile, std::string folder, std::vector<int> gtPa
plotFile.close();
for(int i = 0; i < map->floors.size(); ++i){
plot.printSingleFloor("/home/toni/Documents/programme/localization/IPIN2017/code/eval/"+ folder + "/image" + std::to_string(numFile) + "_" + std::to_string(t), i);
plot.printSingleFloor(evalDir + "/image" + std::to_string(numFile) + "_" + std::to_string(t), i);
plot.show();
usleep(10*10);
}
plot.printSideView("/home/toni/Documents/programme/localization/IPIN2017/code/eval/"+ folder + "/image" + std::to_string(numFile) + "_" + std::to_string(t), 90);
plot.printSideView(evalDir + "/image" + std::to_string(numFile) + "_" + std::to_string(t), 90);
plot.show();
plot.printSideView("/home/toni/Documents/programme/localization/IPIN2017/code/eval/"+ folder + "/image" + std::to_string(numFile) + "_" + std::to_string(t), 0);
plot.printSideView(evalDir + "/image" + std::to_string(numFile) + "_" + std::to_string(t), 0);
plot.show();
plot.printOverview("/home/toni/Documents/programme/localization/IPIN2017/code/eval/"+ folder + "/image" + std::to_string(numFile) + "_" + std::to_string(t));
plot.printOverview(evalDir + "/image" + std::to_string(numFile) + "_" + std::to_string(t));
plot.show();
@@ -368,7 +376,7 @@ void run(DataSetup setup, int numFile, std::string folder, std::vector<int> gtPa
//save as screenshot for klb
if(Settings::useKLB){
std::string path = "/home/toni/Documents/programme/localization/IPIN2017/code/eval/"+ folder + "/image" + std::to_string(numFile) + "_" + std::to_string(t);
std::string path = evalDir + "/image" + std::to_string(numFile) + "_" + std::to_string(t);
gp << "set terminal png size 1280,720\n";
gp << "set output '" << path << "_shennendistance.png'\n";
@@ -396,12 +404,21 @@ int main(int argc, char** argv) {
//run(data.BERKWERK, 6, "EVALBERGWERK"); // Nexus vor
//for(int i = 0; i < 5; ++i){
//run(data.IPIN2017, 0, "ipin2017"); // Nexus Path2
//run(data.IPIN2017, 1, "ipin2017");
//run(data.IPIN2017, 4, "ipin2017", Settings::Paths_IPIN2017::path3);
Settings::useKLB = false;
//run(data.IPIN2017, 0, "ipin2017", Settings::Paths_IPIN2017::path1);
run(data.IPIN2017, 1, "ipin2017", Settings::Paths_IPIN2017::path1);
run(data.IPIN2017, 2, "ipin2017", Settings::Paths_IPIN2017::path2);
//run(data.IPIN2017, 3, "ipin2017", Settings::Paths_IPIN2017::path2);
run(data.IPIN2017, 5, "ipin2017", Settings::Paths_IPIN2017::path3);
run(data.IPIN2017, 3, "ipin2017", Settings::Paths_IPIN2017::path2);
//run(data.IPIN2017, 4, "ipin2017", Settings::Paths_IPIN2017::path3);
Settings::useKLB = true;
//run(data.IPIN2017, 0, "ipin2017", Settings::Paths_IPIN2017::path1);
run(data.IPIN2017, 1, "ipin2017", Settings::Paths_IPIN2017::path1);
run(data.IPIN2017, 2, "ipin2017", Settings::Paths_IPIN2017::path2);
//run(data.IPIN2017, 3, "ipin2017", Settings::Paths_IPIN2017::path2);
run(data.IPIN2017, 5, "ipin2017", Settings::Paths_IPIN2017::path3);
//run(data.IPIN2017, 4, "ipin2017", Settings::Paths_IPIN2017::path3);
//}
}