global planner with dynamic_reconfigure
hi
I'm trying to create my own global planner according to this link: http://wiki.ros.org/navigation/Tutori.... I would like the global planner to capture some parameters of dynamic_reconfigure when creating the global plan. Following is a simple example, if the user marks True in rqt_reconfigure the planner will create a global plan in one way if the user marks false it will create a global plan in another way.
#include <pluginlib/class_list_macros.h>
#include "planejador_header.h"
//register this planner as a BaseGlobalPlanner plugin
PLUGINLIB_EXPORT_CLASS(planejador::Planejador, nav_core::BaseGlobalPlanner)
using namespace std;
//Default Constructor
namespace planejador {
Planejador::Planejador (){
}
Planejador::Planejador(std::string name, costmap_2d::Costmap2DROS* costmap_ros){
initialize(name, costmap_ros);
}
void Planejador::initialize(std::string name, costmap_2d::Costmap2DROS* costmap_ros){
}
bool Planejador::makePlan(const geometry_msgs::PoseStamped& start, const geometry_msgs::PoseStamped& goal, std::vector<geometry_msgs::PoseStamped>& plan ){
// get a Boolean value from a parameter displayed in rqt_reconfigure.
// if value_boolean == true:
// create a global plan this way
// if value_boolean == false:
// create a global plan this way
return true;
}
};
Is it possible to capture these parameters from rqt_reconfigure from my own global_planner?