Skip to content

Commit

Permalink
fix(obstacle_avoidance_planner): isPathGoalChanged (#2205)
Browse files Browse the repository at this point in the history
Signed-off-by: kosuke55 <kosuke.tnp@gmail.com>

Signed-off-by: kosuke55 <kosuke.tnp@gmail.com>
  • Loading branch information
kosuke55 authored Nov 3, 2022
1 parent d10310d commit 333044b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions planning/obstacle_avoidance_planner/src/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,7 @@ bool ObstacleAvoidancePlanner::checkReplan(const PlannerData & planner_data)
return true;
}

if (isPathGoalChanged(planner_data)) {
if (isPathGoalChanged(p)) {
RCLCPP_INFO(get_logger(), "Replan with resetting optimization since path goal was changed.");
resetPrevOptimization();
return true;
Expand Down Expand Up @@ -1077,7 +1077,7 @@ bool ObstacleAvoidancePlanner::isPathGoalChanged(const PlannerData & planner_dat
{
const auto & p = planner_data;

if (prev_path_points_ptr_) {
if (!prev_path_points_ptr_) {
return false;
}

Expand Down

0 comments on commit 333044b

Please sign in to comment.