How can I change the navfn::NavfnROS param unknown_allowed to false
Hello I'm trying to make the old frontier_exploration stack to work on a Turtlebot running indigo. The code uses a navfn::NavfnROS as a planner in order to check if a potential goal can be reached. This leads to the planner finding paths through small holes of unknown space between obstacles and claiming that the goal is reachable. This drives the move_base planner that actualy navigates to the goal, to recovery_spin like crazy, because it is usually trying to reach an unreachable goal. I figure that if I disallow unknown space to be used by the planner my problems would be solved. Given that the NavfnROS doesn't seem to have its own roslaunch file where i could just add a , how could this be done. Did i miss a way to add a to a launch file or is there another way around the problem (maybe a better way to check if the turtlebot can reach a goal?)
//initialization of NavfnROS planner
explore_costmap_ros = new costmap_2d::Costmap2DROS( std::string( "explore_costmap" ), tf_);
planner = new navfn::NavfnROS( std::string( "explore_planner" ), explore_costmap_ros );
...
//checking if goals are reachable
tf::Stamped<tf::Pose> robot_pose;
explore_costmap_ros->getRobotPose( robot_pose );
geometry_msgs::PoseStamped robot_pose_msg;
tf::poseStampedTFToMsg( robot_pose, robot_pose_msg );
std::vector<geometry_msgs::PoseStamped> plan;
planner->computePotential( robot_pose_msg.pose.position );
for( int i = 0; i < goal_list.size(); i++ )
{
if( planner->getPlanFromPotential( goal_pose, plan ) && !plan.empty() )
ROS_INFO("FOUND_GOAL");
}
Thanks in advance for your answers.