new bbox features (2D, 3D)
added stair-sanitizing code adjusted walkers
This commit is contained in:
@@ -91,11 +91,11 @@ private:
|
||||
const float diff = possibleHead.getDiffHalfRAD(head);
|
||||
|
||||
// // compare this heading with the requested one
|
||||
const double angleProb = Distribution::Normal<float>::getProbability(0, Angle::degToRad(15), diff);
|
||||
const double angleProb = Distribution::Normal<float>::getProbability(0, Angle::degToRad(25), diff);
|
||||
// const double angleProb = (diff <= Angle::degToRad(15)) ? 1 : 0.1; // favor best 3 angles equally
|
||||
|
||||
// nodes own importance
|
||||
const double nodeProb = (possible.distToTarget < start.distToTarget) ? 1 : 0.0;
|
||||
const double nodeProb = (possible.distToTarget < start.distToTarget) ? 1 : 0.025;
|
||||
|
||||
// bring it together
|
||||
return angleProb * nodeProb;
|
||||
|
||||
@@ -64,7 +64,7 @@ private:
|
||||
// TODO: WHY?! not only when going back to the start?
|
||||
if (start.x_cm == possible.x_cm && start.y_cm == possible.y_cm) {
|
||||
if (start.z_cm == possible.z_cm) {return 0;} // back to the start
|
||||
throw 1;
|
||||
//throw 1;
|
||||
return 0.5;// stair start/end TODO: fix
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user