13 #include <geometry_msgs/Point.h> 34 ROS_INFO(
"MapRegionVisualization with name '%s' did not find a 'line_width' parameter. Using default.",
name_.c_str());
37 int colorValue = 16777215;
38 if (!
getParam(
"color", colorValue)) {
39 ROS_INFO(
"MapRegionVisualization with name '%s' did not find a 'color' parameter. Using default.",
name_.c_str());
50 marker_.action = visualization_msgs::Marker::ADD;
51 marker_.type = visualization_msgs::Marker::LINE_STRIP;
70 float halfLengthX = map.
getLength().x() / 2.0;
71 float halfLengthY = map.
getLength().y() / 2.0;
const Length & getLength() const
bool visualize(const grid_map::GridMap &map)
Time getTimestamp() const
void publish(const boost::shared_ptr< M > &message) const
bool getPosition(const Index &index, Position &position) const
MapRegionVisualization(ros::NodeHandle &nodeHandle, const std::string &name)
bool readParameters(XmlRpc::XmlRpcValue &config)
const std::string & getFrameId() const
virtual ~MapRegionVisualization()
const unsigned int nVertices_
Number of vertices of the map region visualization.
bool getParam(const std::string &name, std::string &value)
visualization_msgs::Marker marker_
Marker to be published.
std_msgs::ColorRGBA color_
Color of the map region visualization.
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
double lineWidth_
Line width of the map region marker [m].
ros::NodeHandle & nodeHandle_
ROS nodehandle.
std::string name_
Name of the visualization.
void setColorFromColorValue(std_msgs::ColorRGBA &color, const unsigned long &colorValue, bool resetTransparency=true)
ros::Publisher publisher_
ROS publisher of the occupancy grid.
virtual bool readParameters(XmlRpc::XmlRpcValue &config)