Skip to content

Commit

Permalink
Fix Smac cleanup (#2477)
Browse files Browse the repository at this point in the history
* fix smac2d cleanup

* same for hybrid
  • Loading branch information
doisyg authored and SteveMacenski committed Sep 14, 2021
1 parent 65f8d74 commit f116316
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions nav2_smac_planner/src/smac_planner_2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,10 @@ void SmacPlanner2D::cleanup()
_name.c_str());
_a_star.reset();
_smoother.reset();
_costmap_downsampler->on_cleanup();
_costmap_downsampler.reset();
if (_costmap_downsampler) {
_costmap_downsampler->on_cleanup();
_costmap_downsampler.reset();
}
_raw_plan_publisher.reset();
}

Expand Down
6 changes: 4 additions & 2 deletions nav2_smac_planner/src/smac_planner_hybrid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,10 @@ void SmacPlannerHybrid::cleanup()
_name.c_str());
_a_star.reset();
_smoother.reset();
_costmap_downsampler->on_cleanup();
_costmap_downsampler.reset();
if (_costmap_downsampler) {
_costmap_downsampler->on_cleanup();
_costmap_downsampler.reset();
}
_raw_plan_publisher.reset();
}

Expand Down

0 comments on commit f116316

Please sign in to comment.