Skip to content

Commit

Permalink
Fix bug where global planner lethal cost is always 1 unit smaller tha…
Browse files Browse the repository at this point in the history
…n expected (#78)
  • Loading branch information
siferati authored May 24, 2023
1 parent 4e6cb5e commit 8091aac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion global_planner/include/global_planner/dijkstra.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class DijkstraExpansion : public Expander {

float getCost(unsigned char* costs, int n) {
float c = costs[n];
if (c < lethal_cost_ - 1 || (unknown_ && c==255)) {
if (c < lethal_cost_ || (unknown_ && c==255)) {
c = c * factor_ + neutral_cost_;
if (c >= lethal_cost_)
c = lethal_cost_ - 1;
Expand Down

0 comments on commit 8091aac

Please sign in to comment.