1 #ifndef BOUNDED_EXPLORE_LAYER_H_ 2 #define BOUNDED_EXPLORE_LAYER_H_ 6 #include <costmap_2d/GenericPluginConfig.h> 7 #include <dynamic_reconfigure/server.h> 9 #include <geometry_msgs/Polygon.h> 10 #include <frontier_exploration/Frontier.h> 11 #include <frontier_exploration/UpdateBoundaryPolygon.h> 12 #include <frontier_exploration/GetNextFrontier.h> 36 virtual void updateBounds(
double origin_x,
double origin_y,
double origin_yaw,
double* polygon_min_x,
double* polygon_min_y,
double* polygon_max_x,
37 double* polygon_max_y);
66 bool updateBoundaryPolygonService(frontier_exploration::UpdateBoundaryPolygon::Request &req, frontier_exploration::UpdateBoundaryPolygon::Response &res);
81 bool getNextFrontierService(frontier_exploration::GetNextFrontier::Request &req, frontier_exploration::GetNextFrontier::Response &res);
89 bool getNextFrontier(geometry_msgs::PoseStamped start_pose, geometry_msgs::PoseStamped &next_frontier);
99 void reconfigureCB(costmap_2d::GenericPluginConfig &config, uint32_t level);
101 dynamic_reconfigure::Server<costmap_2d::GenericPluginConfig> *
dsrv_;
virtual void reset()
Reset exploration progress.
geometry_msgs::Polygon polygon_
bool getNextFrontierService(frontier_exploration::GetNextFrontier::Request &req, frontier_exploration::GetNextFrontier::Response &res)
ROS Service wrapper for getNextFrontier.
std::string frontier_travel_point_
bool updateBoundaryPolygon(geometry_msgs::PolygonStamped polygon_stamped)
Load polygon boundary to draw on map with each update.
void mapUpdateKeepObstacles(costmap_2d::Costmap2D &master_grid, int min_i, int min_j, int max_i, int max_j)
Update the map with exploration boundary data.
tf::TransformListener tf_listener_
virtual void updateCosts(costmap_2d::Costmap2D &master_grid, int min_i, int min_j, int max_i, int max_j)
Update requested costmap window.
costmap_2d layer plugin that holds the state for a bounded frontier exploration task. Manages the boundary polygon, superimposes the polygon on the overall exploration costmap, and processes costmap to find next frontier to explore.
virtual void updateBounds(double origin_x, double origin_y, double origin_yaw, double *polygon_min_x, double *polygon_min_y, double *polygon_max_x, double *polygon_max_y)
Calculate bounds of costmap window to update.
ros::Publisher frontier_cloud_pub
bool getNextFrontier(geometry_msgs::PoseStamped start_pose, geometry_msgs::PoseStamped &next_frontier)
Search the costmap for next reachable frontier to explore.
bool updateBoundaryPolygonService(frontier_exploration::UpdateBoundaryPolygon::Request &req, frontier_exploration::UpdateBoundaryPolygon::Response &res)
ROS Service wrapper for updateBoundaryPolygon.
ros::ServiceServer polygonService_
virtual void matchSize()
Match dimensions and origin of parent costmap.
virtual void onInitialize()
Loads default values and initialize exploration costmap.
void reconfigureCB(costmap_2d::GenericPluginConfig &config, uint32_t level)
dynamic_reconfigure::Server< costmap_2d::GenericPluginConfig > * dsrv_
ros::ServiceServer frontierService_