Go to the documentation of this file.
68 value = std::min(value, 1.0
f);
69 value = std::max(value, 0.0
f);
71 float h = value * 5.0f + 1.0f;
89 return Ogre::ColourValue(r, g, b, 1.0
f);
95 new rviz::EnumProperty(
"Active label",
"__NEW__",
"Current active label. Can be edited with Cluster Label Tool",
98 "Transparency of the Labeled Cluster Visualization. 0.0 is fully "
99 "transparent, 1.0 fully opaque",
109 "Show a transparent silhouette of the whole mesh to help with "
127 ROS_ERROR(
"Label Display: Geometry requested, but none available!");
136 ROS_WARN(
"Label Display: already has data, but setData() was called again!");
145 ROS_INFO(
"Label Display: received data");
183 ROS_ERROR(
"Label Display: Should change visual but no visual selected!");
201 ROS_WARN(
"Label Display: No data available! Can't show map");
272 QColor(rainbowColor.r * 255, rainbowColor.g * 255, rainbowColor.b * 255),
289 float colorIndex = 0.0;
292 std::stringstream ss;
293 ss <<
"ClusterLabelVisual_" << i;
306 vector<uint32_t> allFacesVector;
307 for (uint32_t i = 0; i <
m_geometry->faces.size(); i++)
309 allFacesVector.push_back(i);
323 bool foundTool =
false;
324 for (
int i = 0; i < toolClasses.size(); i++)
326 if (toolClasses.at(i).contains(
"ClusterLabel"))
void onInitialize()
RViz callback on initialize.
virtual bool getBool() const
virtual int getOptionInt()
void onDisable()
RViz callback on disable.
virtual void clearOptions()
bool has_data
A variable that will be set to true, once the initial data has arrived.
~ClusterLabelDisplay()
Destructor.
void onEnable()
RViz callback on enable.
Ogre::ColourValue getRainbowColor(float value)
shared_ptr< Geometry > getGeometry()
Getter for the current geometry.
uint32_t m_activeVisualId
ID of the current active visual.
rviz::FloatProperty * m_sphereSizeProperty
Property to set the brushsize of the sphere brush of the label tool from this package.
#define ROS_DEBUG_STREAM(args)
ClusterLabelTool * m_tool
Label tool.
Display class for the map plugin.
virtual void setStatus(StatusProperty::Level level, const QString &name, const QString &text)
void fillPropertyOptions()
Dynamically fills the dropdown menus of those properties.
void signalAddLabel(Cluster cluster)
This signal is used for delegating new label data to the master display.
void notifyLabelTool()
Refreshes the tool's current visual.
#define PLUGINLIB_EXPORT_CLASS(class_type, base_class_type)
virtual float getFloat() const
virtual void addOption(const QString &option, int value=0)
rviz::Property * m_colorsProperty
Property for selecting colors (menu)
void addLabel(string label, vector< uint32_t > faces)
The tool will call this function and emit the signal below to the master display to create the label.
vector< shared_ptr< ClusterLabelVisual > > m_visuals
Visuals.
std::string getStdString()
void updateSphereSize()
Updates the sphere size for the brush tool.
virtual ToolManager * getToolManager() const=0
void updateMap()
Update the map, based on newly loaded data since the last update.
void createVisualsFromClusterList()
Create visuals for each cluster in the list.
void setData(shared_ptr< Geometry > geometry, vector< Cluster > clusters)
Setter for the geometry and cluster data.
#define ROS_INFO_STREAM(args)
ClusterLabelDisplay()
Constructor.
unique_ptr< ClusterLabelVisual > m_phantomVisual
Additional visual to help with labeling without a TexturedMesh.
rviz::BoolProperty * m_phantomVisualProperty
Property to hide or show a phantom visual.
Visual to show a labeled cluster.
rviz::EnumProperty * m_activeVisualProperty
Property for the current active visual.
void updateColors()
Updates the colors, based on newly loaded data since the last update.
DisplayContext * context_
virtual void setReadOnly(bool read_only)
void createPhantomVisual()
Creates a phantom visual.
void updatePhantomVisual()
Updates the phantom visual, based on newly loaded data since the last update.
std::vector< rviz::ColorProperty * > m_colorProperties
Properties for selecting colors (menu-items)
vector< Cluster > m_clusterList
Cluster data.
virtual void removeChildren(int start_index=0, int count=-1)
shared_ptr< Geometry > m_geometry
Geometry.
rviz::FloatProperty * m_alphaProperty
Property to set transparency.
void changeVisual()
Slot for changing the visual to the selected visual from the dropdown menu.
void initializeLabelTool()
Programmatically create an instance of the label tool from this package.
rviz_map_plugin
Author(s): Sebastian Pütz
, Kristin Schmidt , Jan Philipp Vogtherr , Malte kleine Piening
autogenerated on Sun Jan 21 2024 04:06:25