Display for showing the mesh in different modes. More...
#include <MeshDisplay.hpp>
Public Member Functions | |
void | addTexture (Texture &texture, uint32_t textureIndex) |
Add a texture. More... | |
void | addVertexCosts (std::string costlayer, vector< float > &vertexCosts) |
Adds a vertex costlayer. More... | |
void | clearVertexCosts () |
Clears the vertex costs. More... | |
void | ignoreIncomingMessages () |
disables visualization of incoming messages More... | |
MeshDisplay () | |
Constructor. More... | |
void | onDisable () |
RViz callback on disable. More... | |
void | onEnable () |
RViz callback on enable. More... | |
void | setGeometry (shared_ptr< Geometry > geometry) |
Set the geometry. More... | |
void | setMaterials (vector< Material > &materials, vector< TexCoords > &texCoords) |
Set the materials and texture coordinates. More... | |
void | setPose (Ogre::Vector3 &position, Ogre::Quaternion &orientation) |
Set geometrys pose. More... | |
void | setVertexColors (vector< Color > &vertexColors) |
Set the vertex colors. More... | |
void | setVertexNormals (vector< Normal > &vertexNormals) |
Set the vertex normals. More... | |
void | subscribe () |
Set the topics to subscribe. More... | |
void | unsubscribe () |
Unsubscribes all topics. More... | |
~MeshDisplay () | |
Destructor. More... | |
![]() | |
virtual void | deleteStatus (const QString &name) |
void | deleteStatusStd (const std::string &name) |
Display () | |
void | emitTimeSignal (ros::Time time) |
QWidget * | getAssociatedWidget () const |
PanelDockWidget * | getAssociatedWidgetPanel () |
virtual QString | getClassId () const |
Ogre::SceneNode * | getSceneNode () const |
QVariant | getViewData (int column, int role) const override |
Qt::ItemFlags | getViewFlags (int column) const override |
uint32_t | getVisibilityBits () |
void | initialize (DisplayContext *context) |
bool | isEnabled () const |
void | load (const Config &config) override |
virtual void | reset () |
void | save (Config config) const override |
void | setAssociatedWidget (QWidget *widget) |
virtual void | setClassId (const QString &class_id) |
void | setFixedFrame (const QString &fixed_frame) |
void | setName (const QString &name) override |
virtual void | setStatus (StatusProperty::Level level, const QString &name, const QString &text) |
void | setStatusStd (StatusProperty::Level level, const std::string &name, const std::string &text) |
virtual void | setTopic (const QString &topic, const QString &datatype) |
void | setVisibilityBits (uint32_t bits) |
void | unsetVisibilityBits (uint32_t bits) |
virtual void | update (float wall_dt, float ros_dt) |
~Display () override | |
![]() | |
BoolProperty (const QString &name, bool default_value, const QString &description, P *parent, Func &&changed_slot) | |
BoolProperty (const QString &name, bool default_value, const QString &description, Property *parent, Func &&changed_slot, const R *receiver) | |
BoolProperty (const QString &name=QString(), bool default_value=false, const QString &description=QString(), Property *parent=nullptr) | |
virtual bool | getBool () const |
bool | getDisableChildren () override |
bool | getDisableChildrenIfFalse () |
void | setDisableChildrenIfFalse (bool disable) |
~BoolProperty () override | |
![]() | |
virtual void | addChild (Property *child, int index=-1) |
Property * | childAt (int index) const |
virtual Property * | childAtUnchecked (int index) const |
virtual void | collapse () |
std::enable_if<!QtPrivate::FunctionPointer< Func >::IsPointerToMemberFunction, QMetaObject::Connection >::type | connect (const QObject *context, Func &&slot, Qt::ConnectionType type=Qt::AutoConnection) |
QMetaObject::Connection | connect (const QObject *receiver, const char *slot, Qt::ConnectionType type=Qt::AutoConnection) |
std::enable_if< QtPrivate::FunctionPointer< Func >::IsPointerToMemberFunction, QMetaObject::Connection >::type | connect (const R *receiver, Func &&slot, Qt::ConnectionType type=Qt::AutoConnection) |
std::enable_if<!QtPrivate::FunctionPointer< Func >::IsPointerToMemberFunction, QMetaObject::Connection >::type | connect (Func &&slot, Qt::ConnectionType type=Qt::AutoConnection) |
bool | contains (Property *possible_child) const |
virtual QWidget * | createEditor (QWidget *parent, const QStyleOptionViewItem &option) |
virtual void | expand () |
virtual QString | getDescription () const |
virtual bool | getHidden () const |
virtual QIcon | getIcon () const |
PropertyTreeModel * | getModel () const |
virtual QString | getName () const |
std::string | getNameStd () const |
Property * | getParent () const |
virtual bool | getReadOnly () const |
virtual QVariant | getValue () const |
void | hide () |
void | insertChildSorted (Property *child) |
bool | isAncestorOf (Property *possible_child) const |
virtual void | moveChild (int from_index, int to_index) |
virtual int | numChildren () const |
virtual bool | paint (QPainter *painter, const QStyleOptionViewItem &option) const |
Property (const QString &name, const QVariant &default_value, const QString &description, P *parent, Func &&changed_slot) | |
Property (const QString &name, const QVariant &default_value, const QString &description, Property *parent, Func &&changed_slot, const R *receiver) | |
Property (const QString &name=QString(), const QVariant &default_value=QVariant(), const QString &description=QString(), Property *parent=nullptr) | |
virtual void | removeChildren (int start_index=0, int count=-1) |
int | rowNumberInParent () const |
virtual void | setDescription (const QString &description) |
virtual void | setHidden (bool hidden) |
virtual void | setIcon (const QIcon &icon) |
void | setModel (PropertyTreeModel *model) |
void | setParent (Property *new_parent) |
virtual void | setReadOnly (bool read_only) |
void | setShouldBeSaved (bool save) |
virtual bool | setValue (const QVariant &new_value) |
bool | shouldBeSaved () const |
void | show () |
virtual Property * | subProp (const QString &sub_name) |
Property * | takeChild (Property *child) |
virtual Property * | takeChildAt (int index) |
~Property () override | |
Private Slots | |
void | updateBufferSize () |
Updates the buffer size. More... | |
void | updateMaterialAndTextureServices () |
Updates the material and texture services. More... | |
void | updateMesh () |
Updates the mesh. More... | |
void | updateNormals () |
Update the mesh normals. More... | |
void | updateNormalsColor () |
Update the color of the mesh normals. More... | |
void | updateNormalsSize () |
Update the size of the mesh normals. More... | |
void | updateTopic () |
Updates the subscribed topic. More... | |
void | updateVertexColorService () |
Updates the vertex color service. More... | |
void | updateVertexColorsTopic () |
Updates the subscribed vertex colors topic. More... | |
void | updateVertexCosts () |
Update the vertex costs. More... | |
void | updateVertexCostsTopic () |
Updates the subscribed vertex costs topic. More... | |
void | updateWireframe () |
Updates the mesh wireframe. More... | |
Private Member Functions | |
std::shared_ptr< MeshVisual > | addNewVisual () |
adds a new visual to the ring buffer More... | |
void | cacheVertexCosts (std::string layer, const std::vector< float > &costs) |
Cache function for vertex cost messages. More... | |
std::shared_ptr< MeshVisual > | getLatestVisual () |
delivers the latest mesh visual More... | |
void | incomingGeometry (const mesh_msgs::MeshGeometryStamped::ConstPtr &meshMsg) |
Handler for incoming geometry messages. Validate data and update mesh. More... | |
void | incomingVertexColors (const mesh_msgs::MeshVertexColorsStamped::ConstPtr &colorsStamped) |
Handler for incoming vertex color messages. Validate data and update mesh. More... | |
void | incomingVertexCosts (const mesh_msgs::MeshVertexCostsStamped::ConstPtr &costsStamped) |
Handler for incoming vertex cost messages. Validate data and update mesh. More... | |
void | initialServiceCall () |
initial service call for UUID & geometry More... | |
void | onInitialize () |
RViz callback on initialize. More... | |
void | processMessage (const mesh_msgs::MeshGeometryStamped::ConstPtr &meshMsg) |
Sets data for trianglemesh_visual and updates the mesh. More... | |
void | requestMaterials (std::string uuid) |
Requests materials from the specified service. More... | |
void | requestVertexColors (std::string uuid) |
Requests vertex colors from the specified service. More... | |
Private Attributes | |
rviz::IntProperty * | m_bufferSize |
Property to handle buffer size. More... | |
message_filters::Cache< mesh_msgs::MeshVertexColorsStamped > * | m_colorsSynchronizer |
Synchronizer for vertex colors. More... | |
std::map< std::string, std::vector< float > > | m_costCache |
Cache for received vertex cost messages. More... | |
rviz::EnumProperty * | m_costColorType |
Property for selecting the color type for cost display. More... | |
rviz::FloatProperty * | m_costLowerLimit |
Property for setting the lower limit of cost display. More... | |
message_filters::Cache< mesh_msgs::MeshVertexCostsStamped > * | m_costsSynchronizer |
Synchronizer for vertex costs. More... | |
rviz::FloatProperty * | m_costUpperLimit |
Property for setting the upper limit of cost display. More... | |
rviz::BoolProperty * | m_costUseCustomLimits |
Property for using custom limits for cost display. More... | |
rviz::EnumProperty * | m_displayType |
Property to select the display type. More... | |
rviz::FloatProperty * | m_facesAlpha |
Property to set faces transparency. More... | |
rviz::ColorProperty * | m_facesColor |
Property to set faces color. More... | |
ros::ServiceClient | m_geometryClient |
Client to request the geometry. More... | |
bool | m_ignoreMsgs |
if set to true, ignore incoming messages and do not use services to request materials More... | |
std::string | m_lastUuid |
Uuid of the last received message. More... | |
ros::ServiceClient | m_materialsClient |
Client to request the materials. More... | |
rviz::StringProperty * | m_materialServiceName |
Property to handle service name for materials. More... | |
message_filters::Subscriber< mesh_msgs::MeshGeometryStamped > | m_meshSubscriber |
Subscriber for meshMsg. More... | |
message_filters::Cache< mesh_msgs::MeshGeometryStamped > * | m_meshSynchronizer |
Synchronizer for meshMsgs. More... | |
rviz::RosTopicProperty * | m_meshTopic |
Property to handle topic for meshMsg. More... | |
uint32_t | m_messagesReceived |
Counter for the received messages. More... | |
rviz::FloatProperty * | m_normalsAlpha |
Property to set the transparency of the normals. More... | |
rviz::ColorProperty * | m_normalsColor |
Property to set the color of the normals. More... | |
rviz::FloatProperty * | m_scalingFactor |
Property to set the size of the normals. More... | |
rviz::EnumProperty * | m_selectVertexCostMap |
Property to select different types of vertex cost maps to be shown. More... | |
rviz::BoolProperty * | m_showNormals |
Property to select the normals. More... | |
rviz::BoolProperty * | m_showTexturedFacesOnly |
Property to only show textured faces when texturizing is enabled. More... | |
rviz::BoolProperty * | m_showWireframe |
Property to select the wireframe. More... | |
ros::ServiceClient | m_textureClient |
Client to request the textures. More... | |
rviz::StringProperty * | m_textureServiceName |
Property to handle service name for textures. More... | |
tf2_ros::MessageFilter< mesh_msgs::MeshGeometryStamped > * | m_tfMeshFilter |
Messagefilter for meshMsg. More... | |
tf2_ros::MessageFilter< mesh_msgs::MeshVertexColorsStamped > * | m_tfVertexColorsFilter |
Messagefilter for vertex colors. More... | |
tf2_ros::MessageFilter< mesh_msgs::MeshVertexCostsStamped > * | m_tfVertexCostsFilter |
Messagefilter for vertex costs. More... | |
ros::ServiceClient | m_uuidClient |
Client to request the UUID. More... | |
ros::ServiceClient | m_vertexColorClient |
Client to request the vertex colors. More... | |
rviz::StringProperty * | m_vertexColorServiceName |
Property to handle service name for vertexColors. More... | |
message_filters::Subscriber< mesh_msgs::MeshVertexColorsStamped > | m_vertexColorsSubscriber |
Subscriber for vertex colors. More... | |
rviz::RosTopicProperty * | m_vertexColorsTopic |
Property to handle topic for vertex colors. More... | |
message_filters::Subscriber< mesh_msgs::MeshVertexCostsStamped > | m_vertexCostsSubscriber |
Subscriber for vertex costs. More... | |
rviz::RosTopicProperty * | m_vertexCostsTopic |
Property to handle topic for vertex cost maps. More... | |
std::queue< std::shared_ptr< MeshVisual > > | m_visuals |
Visual data. More... | |
rviz::FloatProperty * | m_wireframeAlpha |
Property to set wireframe transparency. More... | |
rviz::ColorProperty * | m_wireframeColor |
Property to set wireframe color. More... | |
Additional Inherited Members | |
![]() | |
virtual void | onEnableChanged () |
void | queueRender () |
void | setEnabled (bool enabled) |
void | setIcon (const QIcon &icon) override |
![]() | |
bool | setBool (bool value) |
![]() | |
void | timeSignal (ros::Time time, QPrivateSignal) |
![]() | |
void | aboutToChange () |
void | changed () |
void | childListChanged (Property *this_property) |
![]() | |
virtual void | clearStatuses () |
virtual void | fixedFrameChanged () |
bool | initialized () const |
![]() | |
void | loadValue (const Config &config) |
![]() | |
DisplayContext * | context_ |
QString | fixed_frame_ |
Ogre::SceneManager * | scene_manager_ |
Ogre::SceneNode * | scene_node_ |
ros::NodeHandle | threaded_nh_ |
ros::NodeHandle | update_nh_ |
![]() | |
bool | child_indexes_valid_ |
QIcon | icon_ |
PropertyTreeModel * | model_ |
QVariant | value_ |
Display for showing the mesh in different modes.
Definition at line 128 of file MeshDisplay.hpp.
rviz_map_plugin::MeshDisplay::MeshDisplay | ( | ) |
Constructor.
Definition at line 72 of file MeshDisplay.cpp.
rviz_map_plugin::MeshDisplay::~MeshDisplay | ( | ) |
Destructor.
Definition at line 199 of file MeshDisplay.cpp.
|
private |
adds a new visual to the ring buffer
Definition at line 973 of file MeshDisplay.cpp.
void rviz_map_plugin::MeshDisplay::addTexture | ( | Texture & | texture, |
uint32_t | textureIndex | ||
) |
Add a texture.
texture | The texture |
textureIndex | The textures index |
Definition at line 395 of file MeshDisplay.cpp.
void rviz_map_plugin::MeshDisplay::addVertexCosts | ( | std::string | costlayer, |
vector< float > & | vertexCosts | ||
) |
Adds a vertex costlayer.
costlayer | Name of the new costlayer |
vertexCosts | The vertex costs |
Definition at line 366 of file MeshDisplay.cpp.
|
private |
Cache function for vertex cost messages.
costsStamped | The vertex cost message |
Definition at line 944 of file MeshDisplay.cpp.
void rviz_map_plugin::MeshDisplay::clearVertexCosts | ( | ) |
Clears the vertex costs.
Definition at line 360 of file MeshDisplay.cpp.
|
private |
delivers the latest mesh visual
Definition at line 964 of file MeshDisplay.cpp.
void rviz_map_plugin::MeshDisplay::ignoreIncomingMessages | ( | ) |
disables visualization of incoming messages
When called, incoming mesh messages will be ignored and the rviz properties to set topics and services will be hidden. This cloud be useful when using this display as a child-display e.g. of the MapDisplay
Definition at line 320 of file MeshDisplay.cpp.
|
private |
Handler for incoming geometry messages. Validate data and update mesh.
meshMsg | The geometry |
Definition at line 798 of file MeshDisplay.cpp.
|
private |
Handler for incoming vertex color messages. Validate data and update mesh.
colorsStamped | The vertex colors |
Definition at line 805 of file MeshDisplay.cpp.
|
private |
Handler for incoming vertex cost messages. Validate data and update mesh.
costsStamped | The vertex costs |
Definition at line 823 of file MeshDisplay.cpp.
|
private |
initial service call for UUID & geometry
Definition at line 692 of file MeshDisplay.cpp.
|
virtual |
RViz callback on disable.
Reimplemented from rviz::Display.
Definition at line 250 of file MeshDisplay.cpp.
|
virtual |
RViz callback on enable.
Reimplemented from rviz::Display.
Definition at line 241 of file MeshDisplay.cpp.
|
privatevirtual |
RViz callback on initialize.
Reimplemented from rviz::Display.
Definition at line 203 of file MeshDisplay.cpp.
|
private |
Sets data for trianglemesh_visual and updates the mesh.
meshMsg | Message containing geometry information |
Definition at line 736 of file MeshDisplay.cpp.
|
private |
Requests materials from the specified service.
uuid | Mesh UUID |
Definition at line 865 of file MeshDisplay.cpp.
|
private |
Requests vertex colors from the specified service.
uuid | Mesh UUID |
Definition at line 835 of file MeshDisplay.cpp.
void rviz_map_plugin::MeshDisplay::setGeometry | ( | shared_ptr< Geometry > | geometry | ) |
void rviz_map_plugin::MeshDisplay::setMaterials | ( | vector< Material > & | materials, |
vector< TexCoords > & | texCoords | ||
) |
Set the materials and texture coordinates.
materials | The materials |
texCoords | The texture coordinates |
Definition at line 385 of file MeshDisplay.cpp.
void rviz_map_plugin::MeshDisplay::setPose | ( | Ogre::Vector3 & | position, |
Ogre::Quaternion & | orientation | ||
) |
Set geometrys pose.
position | position of the pose |
orientation | orientation of the pose |
Definition at line 404 of file MeshDisplay.cpp.
void rviz_map_plugin::MeshDisplay::setVertexColors | ( | vector< Color > & | vertexColors | ) |
Set the vertex colors.
vertexColors | The vertex colors |
Definition at line 350 of file MeshDisplay.cpp.
void rviz_map_plugin::MeshDisplay::setVertexNormals | ( | vector< Normal > & | vertexNormals | ) |
Set the vertex normals.
vertexNormals | The vertex normals |
Definition at line 372 of file MeshDisplay.cpp.
void rviz_map_plugin::MeshDisplay::subscribe | ( | ) |
Set the topics to subscribe.
Definition at line 258 of file MeshDisplay.cpp.
void rviz_map_plugin::MeshDisplay::unsubscribe | ( | ) |
Unsubscribes all topics.
Definition at line 297 of file MeshDisplay.cpp.
|
privateslot |
Updates the buffer size.
Definition at line 417 of file MeshDisplay.cpp.
|
privateslot |
Updates the material and texture services.
Definition at line 622 of file MeshDisplay.cpp.
|
privateslot |
Updates the mesh.
Definition at line 425 of file MeshDisplay.cpp.
|
privateslot |
Update the mesh normals.
Definition at line 535 of file MeshDisplay.cpp.
|
privateslot |
Update the color of the mesh normals.
Definition at line 547 of file MeshDisplay.cpp.
|
privateslot |
Update the size of the mesh normals.
Definition at line 558 of file MeshDisplay.cpp.
|
privateslot |
Updates the subscribed topic.
Definition at line 615 of file MeshDisplay.cpp.
|
privateslot |
Updates the vertex color service.
Definition at line 660 of file MeshDisplay.cpp.
|
privateslot |
Updates the subscribed vertex colors topic.
Definition at line 595 of file MeshDisplay.cpp.
|
privateslot |
Update the vertex costs.
Definition at line 567 of file MeshDisplay.cpp.
|
privateslot |
Updates the subscribed vertex costs topic.
Definition at line 605 of file MeshDisplay.cpp.
|
privateslot |
Updates the mesh wireframe.
Definition at line 524 of file MeshDisplay.cpp.
|
private |
Property to handle buffer size.
Definition at line 407 of file MeshDisplay.hpp.
|
private |
Synchronizer for vertex colors.
Definition at line 389 of file MeshDisplay.hpp.
|
private |
Cache for received vertex cost messages.
Definition at line 473 of file MeshDisplay.hpp.
|
private |
Property for selecting the color type for cost display.
Definition at line 434 of file MeshDisplay.hpp.
|
private |
Property for setting the lower limit of cost display.
Definition at line 446 of file MeshDisplay.hpp.
|
private |
Synchronizer for vertex costs.
Definition at line 392 of file MeshDisplay.hpp.
|
private |
Property for setting the upper limit of cost display.
Definition at line 449 of file MeshDisplay.hpp.
|
private |
Property for using custom limits for cost display.
Definition at line 443 of file MeshDisplay.hpp.
|
private |
Property to select the display type.
Definition at line 410 of file MeshDisplay.hpp.
|
private |
Property to set faces transparency.
Definition at line 416 of file MeshDisplay.hpp.
|
private |
Property to set faces color.
Definition at line 413 of file MeshDisplay.hpp.
|
private |
Client to request the geometry.
Definition at line 365 of file MeshDisplay.hpp.
|
private |
if set to true, ignore incoming messages and do not use services to request materials
Definition at line 350 of file MeshDisplay.hpp.
|
private |
Uuid of the last received message.
Definition at line 398 of file MeshDisplay.hpp.
|
private |
Client to request the materials.
Definition at line 356 of file MeshDisplay.hpp.
|
private |
Property to handle service name for materials.
Definition at line 428 of file MeshDisplay.hpp.
|
private |
Subscriber for meshMsg.
Definition at line 368 of file MeshDisplay.hpp.
|
private |
Synchronizer for meshMsgs.
Definition at line 386 of file MeshDisplay.hpp.
|
private |
Property to handle topic for meshMsg.
Definition at line 404 of file MeshDisplay.hpp.
|
private |
Counter for the received messages.
Definition at line 395 of file MeshDisplay.hpp.
|
private |
Property to set the transparency of the normals.
Definition at line 458 of file MeshDisplay.hpp.
|
private |
Property to set the color of the normals.
Definition at line 455 of file MeshDisplay.hpp.
|
private |
Property to set the size of the normals.
Definition at line 461 of file MeshDisplay.hpp.
|
private |
Property to select different types of vertex cost maps to be shown.
Definition at line 440 of file MeshDisplay.hpp.
|
private |
Property to select the normals.
Definition at line 452 of file MeshDisplay.hpp.
|
private |
Property to only show textured faces when texturizing is enabled.
Definition at line 425 of file MeshDisplay.hpp.
|
private |
Property to select the wireframe.
Definition at line 464 of file MeshDisplay.hpp.
|
private |
Client to request the textures.
Definition at line 359 of file MeshDisplay.hpp.
|
private |
Property to handle service name for textures.
Definition at line 431 of file MeshDisplay.hpp.
|
private |
Messagefilter for meshMsg.
Definition at line 377 of file MeshDisplay.hpp.
|
private |
Messagefilter for vertex colors.
Definition at line 380 of file MeshDisplay.hpp.
|
private |
Messagefilter for vertex costs.
Definition at line 383 of file MeshDisplay.hpp.
|
private |
Client to request the UUID.
Definition at line 362 of file MeshDisplay.hpp.
|
private |
Client to request the vertex colors.
Definition at line 353 of file MeshDisplay.hpp.
|
private |
Property to handle service name for vertexColors.
Definition at line 422 of file MeshDisplay.hpp.
|
private |
Subscriber for vertex colors.
Definition at line 371 of file MeshDisplay.hpp.
|
private |
Property to handle topic for vertex colors.
Definition at line 419 of file MeshDisplay.hpp.
|
private |
Subscriber for vertex costs.
Definition at line 374 of file MeshDisplay.hpp.
|
private |
Property to handle topic for vertex cost maps.
Definition at line 437 of file MeshDisplay.hpp.
|
private |
Visual data.
Definition at line 401 of file MeshDisplay.hpp.
|
private |
Property to set wireframe transparency.
Definition at line 470 of file MeshDisplay.hpp.
|
private |
Property to set wireframe color.
Definition at line 467 of file MeshDisplay.hpp.