Skip to content
Snippets Groups Projects
Commit f7122d8f authored by Sergi Hernandez's avatar Sergi Hernandez
Browse files

Checked if the path is empty when checking if the goal has been reached.

parent e220c192
No related branches found
No related tags found
1 merge request!7Cleaned up the code:
...@@ -255,6 +255,12 @@ bool AckermannPlannerROS::isGoalReached(void) ...@@ -255,6 +255,12 @@ bool AckermannPlannerROS::isGoalReached(void)
ROS_ERROR("AckermannPlannerROS: could not get local plan"); ROS_ERROR("AckermannPlannerROS: could not get local plan");
return false; return false;
} }
if(transformed_plan.empty())
{
ROS_WARN_NAMED("AckermannPlannerROS", "Received an empty transformed plan.");
return false;
}
odom_helper_.get_odom(odom); odom_helper_.get_odom(odom);
if(planner_util_.last_path()) if(planner_util_.last_path())
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment