Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038 #ifndef COSTMAP_2D_STATIC_LAYER_H_
00039 #define COSTMAP_2D_STATIC_LAYER_H_
00040
00041 #include <ros/ros.h>
00042 #include <costmap_2d/costmap_layer.h>
00043 #include <costmap_2d/layered_costmap.h>
00044 #include <costmap_2d/GenericPluginConfig.h>
00045 #include <dynamic_reconfigure/server.h>
00046 #include <nav_msgs/OccupancyGrid.h>
00047 #include <map_msgs/OccupancyGridUpdate.h>
00048 #include <message_filters/subscriber.h>
00049
00050 namespace costmap_2d
00051 {
00052
00053 class StaticLayer : public CostmapLayer
00054 {
00055 public:
00056 StaticLayer();
00057 virtual ~StaticLayer();
00058 virtual void onInitialize();
00059 virtual void activate();
00060 virtual void deactivate();
00061 virtual void reset();
00062
00063 virtual void updateBounds(double robot_x, double robot_y, double robot_yaw, double* min_x, double* min_y, double* max_x,
00064 double* max_y);
00065 virtual void updateCosts(costmap_2d::Costmap2D& master_grid, int min_i, int min_j, int max_i, int max_j);
00066
00067 virtual void matchSize();
00068
00069 private:
00076 void incomingMap(const nav_msgs::OccupancyGridConstPtr& new_map);
00077 void incomingUpdate(const map_msgs::OccupancyGridUpdateConstPtr& update);
00078 void reconfigureCB(costmap_2d::GenericPluginConfig &config, uint32_t level);
00079
00080 unsigned char interpretValue(unsigned char value);
00081
00082 std::string global_frame_;
00083 bool subscribe_to_updates_;
00084 bool map_received_;
00085 bool has_updated_data_;
00086 unsigned int x_,y_,width_,height_;
00087 bool track_unknown_space_;
00088 bool use_maximum_;
00089 bool trinary_costmap_;
00090 ros::Subscriber map_sub_, map_update_sub_;
00091
00092 unsigned char lethal_threshold_, unknown_cost_value_;
00093
00094 mutable boost::recursive_mutex lock_;
00095 dynamic_reconfigure::Server<costmap_2d::GenericPluginConfig> *dsrv_;
00096 };
00097
00098 }
00099
00100 #endif // COSTMAP_2D_STATIC_LAYER_H_
costmap_2d
Author(s): Eitan Marder-Eppstein, David V. Lu!!, Dave Hershberger, contradict@gmail.com
autogenerated on Thu Aug 27 2015 14:06:55