added missing code changes

started working on refactoring of sensors
new test-cases
This commit is contained in:
2016-03-17 17:28:41 +01:00
parent 6346231a64
commit f8d7f768f1
18 changed files with 524 additions and 74 deletions

View File

@@ -95,7 +95,8 @@ public:
const float dist_m = Units::cmToM(knnDoors.getNearestDistance( {n1.x_cm, n1.y_cm, n1.z_cm} ));
// importance for this node (based on the distance from the next door)
n1.imp += favorDoors.getProbability(dist_m) * 0.30;
//n1.imp += favorDoors.getProbability(dist_m) * 0.30;
n1.imp += favorDoors.getProbability(dist_m);
}
@@ -207,9 +208,12 @@ public:
if (dist_m > 2.0) {dist_m = 2.0;}
// overall importance
return - avoidWalls.getProbability(dist_m) * 0.30 // avoid walls
+ stickToWalls.getProbability(dist_m) * 0.15 // walk near walls
+ farAway.getProbability(dist_m) * 0.15 // walk in the middle
// return - avoidWalls.getProbability(dist_m) * 0.30 // avoid walls
// + stickToWalls.getProbability(dist_m) * 0.15 // walk near walls
// + farAway.getProbability(dist_m) * 0.15 // walk in the middle
return - avoidWalls.getProbability(dist_m) // avoid walls
//+ stickToWalls.getProbability(dist_m) // walk near walls
//+ farAway.getProbability(dist_m) // walk in the middle
;