Skip to content

Commit

Permalink
fixed a bug when no obstacles exist
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhepeiWang committed May 19, 2022
1 parent 5b62979 commit 081944d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions gcopter/include/gcopter/firi.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -339,9 +339,14 @@ namespace firi
nH = 0;

bool completed = false;
int bdMinId, pcMinId;
int bdMinId;
double minSqrD = distDs.minCoeff(&bdMinId);
double minSqrR = distRs.minCoeff(&pcMinId);
double minSqrR = INFINITY;
int pcMinId = 0;
if (distRs.cols() == 0)
{
minSqrR = distRs.minCoeff(&pcMinId);
}
for (int i = 0; !completed && i < (M + N); ++i)
{
if (minSqrD < minSqrR)
Expand Down

0 comments on commit 081944d

Please sign in to comment.