11 #include <nav_msgs/GridCells.h> 20 lowerThreshold_(-
std::numeric_limits<float>::infinity()),
21 upperThreshold_(
std::numeric_limits<float>::infinity())
34 ROS_ERROR(
"GridCellsVisualization with name '%s' did not find a 'layer' parameter.",
name_.c_str());
39 ROS_INFO(
"GridCellsVisualization with name '%s' did not find a 'lower_threshold' parameter. Using negative infinity.",
name_.c_str());
43 ROS_INFO(
"GridCellsVisualization with name '%s' did not find a 'upper_threshold' parameter. Using infinity.",
name_.c_str());
59 ROS_WARN_STREAM(
"GridCellsVisualization::visualize: No grid map layer with name '" <<
layer_ <<
"' found.");
62 nav_msgs::GridCells gridCells;
void publish(const boost::shared_ptr< M > &message) const
GridCellsVisualization(ros::NodeHandle &nodeHandle, const std::string &name)
std::string layer_
Type that is transformed to the occupancy grid.
bool exists(const std::string &layer) const
bool readParameters(XmlRpc::XmlRpcValue &config)
bool getParam(const std::string &name, std::string &value)
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
#define ROS_WARN_STREAM(args)
virtual ~GridCellsVisualization()
float lowerThreshold_
Values that are between lower and upper threshold are shown.
ros::NodeHandle & nodeHandle_
ROS nodehandle.
std::string name_
Name of the visualization.
static void toGridCells(const grid_map::GridMap &gridMap, const std::string &layer, float lowerThreshold, float upperThreshold, nav_msgs::GridCells &gridCells)
ros::Publisher publisher_
ROS publisher of the occupancy grid.
virtual bool readParameters(XmlRpc::XmlRpcValue &config)
bool visualize(const grid_map::GridMap &map)