new test cases
worked on all walkers new helper methods new distributions some bugfixes
This commit is contained in:
@@ -198,7 +198,8 @@ public:
|
||||
/** build a stair (z-transition) from n1 to n2 */
|
||||
void buildStairLine(T& _n1, T& _n2) {
|
||||
|
||||
const int gridSize_cm = grid.getGridSize_cm();
|
||||
// half the grid size = small steps
|
||||
const int gridSize_cm = grid.getGridSize_cm() / 2;
|
||||
|
||||
// local copies, needed for std::swap to work
|
||||
T n1 = _n1; T n2 = _n2;
|
||||
|
||||
@@ -197,7 +197,7 @@ public:
|
||||
static Distribution::Normal<float> avoidWalls(0.0, 0.4);
|
||||
|
||||
// favour walking near walls (likely)
|
||||
static Distribution::Normal<float> sticToWalls(0.9, 0.5);
|
||||
static Distribution::Normal<float> stickToWalls(0.9, 0.5);
|
||||
|
||||
// favour walking far away (likely)
|
||||
static Distribution::Normal<float> farAway(2.2, 0.5);
|
||||
@@ -205,7 +205,7 @@ public:
|
||||
|
||||
// overall importance
|
||||
return - avoidWalls.getProbability(dist_m) * 0.30 // avoid walls
|
||||
+ sticToWalls.getProbability(dist_m) * 0.15 // walk near walls
|
||||
+ stickToWalls.getProbability(dist_m) * 0.15 // walk near walls
|
||||
+ farAway.getProbability(dist_m) * 0.15 // walk in the middle
|
||||
;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user