Commit b0bd7881 authored by Sergi Hernandez's avatar Sergi Hernandez
Browse files

Added a check that the index of the best path is valid before getting the trajectory.

parent 95cfe570
......@@ -271,6 +271,8 @@ bool OpendriveGlobalPlanner::makePlan(const geometry_msgs::PoseStamped& start, c
std::cout << std::endl;
}
best_path_index=this->roadmap.get_best_path(best_cost,best_path);
if(best_path_index==-1)
return false;
std::cout << "best path index: " << best_path_index << std::endl;
for(unsigned int i=0;i<best_path.size();i++)
std::cout << best_path[i] << ",";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment