52 "Color scheme for coloring each polygon",
this, SLOT(
updateStyle()));
69 if (color.a == 0.0)
continue;
78 delete outline_object;
97 outline_object->reset();
105 filler_object->reset();
147 for (
const auto& polygon : msg->polygons)
156 Ogre::Vector3 position;
157 Ogre::Quaternion orientation;
160 ROS_DEBUG(
"Error transforming from frame '%s' to frame '%s'",
161 msg->header.frame_id.c_str(), qPrintable(
fixed_frame_));
170 for (
const auto& complex : msg->polygons)
173 for (
const auto& inner : complex.inner)
191 const unsigned int num_fillers = msg->polygons.size();
227 std_msgs::ColorRGBA default_color;
235 std_msgs::ColorRGBA color;
246 color = default_color;
virtual QColor getColor() const
rviz::FloatProperty * filler_alpha_property_
std::vector< nav_2d_msgs::Polygon2D > saved_outlines_
rviz::ColorProperty * outline_color_property_
Displays a nav_2d_msgs::Polygon2DCollection message in Rviz.
std_msgs::ColorRGBA toMsg(const color_util::ColorRGBA &rgba)
DisplayContext * context_
std::vector< PolygonFill * > filler_objects_
Constructs a manual ogre object to display the polygon area as a triangle mesh.
virtual float getFloat() const
Constructs a manual ogre object to display the polygon outline as a line strip.
std_msgs::ColorRGBA getColor(rviz::ColorProperty *color_property, rviz::FloatProperty *alpha_property=nullptr)
Given a Color Property and an optional Float property, return a ROS Color message.
const std::string & getName() const
Ogre::SceneNode * scene_node_
std::vector< std_msgs::ColorRGBA > unique_colors_
Ogre::ColourValue qtToOgre(const QColor &c)
std::vector< PolygonOutline * > outline_objects_
bool shouldDrawOutlines() const
rviz::EnumProperty * color_mode_property_
const std::vector< ColorRGBA24 > & getNamedColors()
rviz::FloatProperty * zoffset_property_
virtual void addOption(const QString &option, int value=0)
Several reusable pieces for displaying polygons.
nav_2d_msgs::Polygon2DCollection saved_polygons_
virtual FrameManager * getFrameManager() const =0
bool shouldDrawFiller() const
PolygonDisplayModeProperty * mode_property_
Ogre::SceneManager * scene_manager_
bool getTransform(const Header &header, Ogre::Vector3 &position, Ogre::Quaternion &orientation)
Wrapper for EnumProperty + enum for whether to display the outline, area, or both.
PolygonMaterial polygon_material_
FillColorMode getFillColorMode() const
rviz::ColorProperty * filler_color_property_
bool validateFloats(const nav_grid::NavGridInfo &info)
#define PLUGINLIB_EXPORT_CLASS(class_type, base_class_type)
virtual void setStatus(StatusProperty::Level level, const QString &name, const QString &text)
void processMessage(const nav_2d_msgs::Polygon2DCollection::ConstPtr &msg) override
virtual ~PolygonsDisplay()