11 #include <nav_msgs/OccupancyGrid.h> 31 ROS_ERROR(
"OccupancyGridVisualization with name '%s' did not find a 'layer' parameter.",
name_.c_str());
36 ROS_ERROR(
"OccupancyGridVisualization with name '%s' did not find a 'data_min' parameter.",
name_.c_str());
41 ROS_ERROR(
"OccupancyGridVisualization with name '%s' did not find a 'data_max' parameter.",
name_.c_str());
58 ROS_WARN_STREAM(
"OccupancyGridVisualization::visualize: No grid map layer with name '" <<
layer_ <<
"' found.");
61 nav_msgs::OccupancyGrid occupancyGrid;
bool visualize(const grid_map::GridMap &map)
OccupancyGridVisualization(ros::NodeHandle &nodeHandle, const std::string &name)
void publish(const boost::shared_ptr< M > &message) const
static void toOccupancyGrid(const grid_map::GridMap &gridMap, const std::string &layer, float dataMin, float dataMax, nav_msgs::OccupancyGrid &occupancyGrid)
bool exists(const std::string &layer) const
bool getParam(const std::string &name, std::string &value)
std::string layer_
Type that is transformed to the occupancy grid.
bool readParameters(XmlRpc::XmlRpcValue &config)
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
#define ROS_WARN_STREAM(args)
virtual ~OccupancyGridVisualization()
ros::NodeHandle & nodeHandle_
ROS nodehandle.
std::string name_
Name of the visualization.
float dataMin_
Minimum and maximum value of the grid map data (used to normalize the cell data in [min...
ros::Publisher publisher_
ROS publisher of the occupancy grid.
virtual bool readParameters(XmlRpc::XmlRpcValue &config)