added new assertins
added some temporary eval parts new helper methods worked on the walkers
This commit is contained in:
@@ -40,6 +40,9 @@ public:
|
||||
GridFactory<T> fac(inv);
|
||||
fac.addInverted(g, z_cm);
|
||||
|
||||
// sanity check
|
||||
Assert::isFalse(inv.getNumNodes() == 0, "inverted grid is empty!");
|
||||
|
||||
// construct KNN search
|
||||
KNN<Grid<T>, 3> knn(inv);
|
||||
|
||||
@@ -194,7 +197,7 @@ public:
|
||||
float getWallImportance(float dist_m) {
|
||||
|
||||
// avoid sticking too close to walls (unlikely)
|
||||
static Distribution::Normal<float> avoidWalls(0.0, 0.4);
|
||||
static Distribution::Normal<float> avoidWalls(0.0, 0.5);
|
||||
|
||||
// favour walking near walls (likely)
|
||||
static Distribution::Normal<float> stickToWalls(0.9, 0.5);
|
||||
|
||||
@@ -155,11 +155,14 @@ private:
|
||||
// update the heading-change and walked-distance
|
||||
next.headingChange_rad += next.heading.getRAD() - cur.heading.getRAD();
|
||||
next.distanceWalked_m += walked_m;
|
||||
++((T*)next.node)->cnt; // TODO: eval only
|
||||
|
||||
if (next.node->z_cm != cur.node->z_cm) {
|
||||
int i = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// done?
|
||||
if (distRest_m <= 0) {return next;}
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ private:
|
||||
if (drawer.getCumProbability() < 0.1 && (--retries) >= 0) {
|
||||
walked_m = 0;
|
||||
cur = start;
|
||||
WHAT THE HELL
|
||||
//WHAT THE HELL
|
||||
if (retries == 0) { reqHeading = dChange.draw(); }
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user