Skip to content

Commit

Permalink
[melodic] Fix leg probabilities (wg-perception#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
s-kodama-isp committed Jul 2, 2021
1 parent bc73fa0 commit a02dc95
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions leg_detector/src/leg_detector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -732,9 +732,9 @@ class LegDetector

memcpy(tmp_mat.data, f.data(), f.size()*sizeof(float));

float probability = 0.5 -
forest->predict(tmp_mat, cv::noArray(), cv::ml::RTrees::PREDICT_SUM) /
forest->getRoots().size();
float probability = 0.5 + 0.5 *
static_cast<float>(forest->predict(tmp_mat, cv::noArray(), cv::ml::RTrees::PREDICT_SUM)) /
static_cast<float>(forest->getRoots().size());

tf::Stamped<tf::Point> loc((*i)->center(), scan->header.stamp, scan->header.frame_id);
try
Expand Down

0 comments on commit a02dc95

Please sign in to comment.