ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

global planner with dynamic_reconfigure

asked 2020-09-23 14:28:27 -0600

mateusguilherme gravatar image

updated 2020-09-23 14:31:02 -0600

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?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-09-23 20:33:26 -0600

Of course, you just need to implement a dynamic reconfigure server within your global planner plugin.

Actually some of the parameters on ROS's default global planner can be dynamically reconfigured. I would suggest to take a look at how it is implemented:

Header:

https://github.com/ros-planning/navig... https://github.com/ros-planning/navig...

Implementation:

https://github.com/ros-planning/navig... https://github.com/ros-planning/navig...

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-09-23 14:28:27 -0600

Seen: 154 times

Last updated: Sep 23 '20