added missing code changes
started working on refactoring of sensors new test-cases
This commit is contained in:
@@ -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
|
||||
;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user