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

Taken into account the worst case rotations of the footprint at the farthest...

Taken into account the worst case rotations of the footprint at the farthest point of the trajectory to check if it is fully contained in the local costmap.
parent 36cd7ad7
No related branches found
No related tags found
1 merge request!7Cleaned up the code:
......@@ -251,11 +251,28 @@ base_local_planner::Trajectory AckermannPlanner::find_best_path(geometry_msgs::P
Eigen::Vector3f pos(global_pose.pose.position.x, global_pose.pose.position.y, tf::getYaw(global_pose.pose.orientation));
Eigen::Vector3f ack_state(ackermann.speed,ackermann.steering_angle,ackermann.steering_angle_velocity);
while(planner_util_->get_world_model()->footprintCost(global_plan_[path_index].pose.position.x,global_plan_[path_index].pose.position.y,tf::getYaw(global_plan_[path_index].pose.orientation),footprint_spec)<0 && path_index>0)
{
if(path_index>0)
path_index--;
}
do{
if(planner_util_->get_world_model()->footprintCost(global_plan_[path_index].pose.position.x,global_plan_[path_index].pose.position.y,tf::getYaw(global_plan_[path_index].pose.orientation),footprint_spec)<0)
{
if(path_index>0)
path_index--;
continue;
}
else if(planner_util_->get_world_model()->footprintCost(global_plan_[path_index].pose.position.x,global_plan_[path_index].pose.position.y,tf::getYaw(global_plan_[path_index].pose.orientation)+1.5707,footprint_spec)<0)
{
if(path_index>0)
path_index--;
continue;
}
else if(planner_util_->get_world_model()->footprintCost(global_plan_[path_index].pose.position.x,global_plan_[path_index].pose.position.y,tf::getYaw(global_plan_[path_index].pose.orientation)-1.5707,footprint_spec)<0)
{
if(path_index>0)
path_index--;
continue;
}
else
break;
}while(path_index>0);
if(path_index==0)
{
std::cout << "empty path" << std::endl;
......
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