#include <iostream>
#include <json/json.h>
#include <vector>
-#include "fiat_punto.h"
+// When the file with precomputed entries is ready.
+//#include "fiat_punto.h"
#include "pslot.hh"
#include "rrtsp.hh"
unsigned int icnt = 0;
unsigned int rcnt = 0;
unsigned int bcnt = 0;
+ unsigned int ncnt = 0; // not better counter
Json::Value best_path;
Json::Value pj;
double cost = 0.0;
double gc = pj["goal_cc"].asDouble();
assert(gc > 0.0);
if (cost == 0.0 || gc < cost) {
+ if (gc < 0.75 * cost) {
+ ncnt = 0;
+ }
best_path = pj["path"];
cost = gc;
bcnt += 1;
+ } else {
+ ncnt++;
}
}
+ if (ncnt > 5) {
+ break;
+ }
p.reset();
rcnt += 1;
}