Skip to content

Commit 74961ca

Browse files
Fix NaN in Updated PathAlign (#3943) (#3945)
(cherry picked from commit 3d14d98) Co-authored-by: Steve Macenski <[email protected]>
1 parent a6b4e60 commit 74961ca

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

nav2_mppi_controller/src/critics/path_align_critic.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ void PathAlignCritic::score(CriticData & data)
126126
}
127127
if (num_samples > 0) {
128128
cost[t] = summed_path_dist / num_samples;
129+
} else {
130+
cost[t] = 0.0f;
129131
}
130132
}
131133

0 commit comments

Comments
 (0)