Gazebo Gui

API Reference

9.0.0~pre1

Visualize gz::msgs::PointCloudPacked messages in a 3D scene. More...

#include <PointCloud.hh>

Signals

void FloatVTopicListChanged ()
 Notify that topic list has changed.
 
void MaxColorChanged ()
 Notify that maximum color has changed.
 
void MaxFloatVChanged ()
 Notify that maximum value has changed.
 
void MinColorChanged ()
 Notify that minimum color has changed.
 
void MinFloatVChanged ()
 Notify that minimum value has changed.
 
void PointCloudTopicListChanged ()
 Notify that topic list has changed.
 
void PointSizeChanged ()
 Notify that point size has changed.
 

Public Member Functions

 PointCloud ()
 Constructor.
 
 ~PointCloud () override
 Destructor.
 
Q_INVOKABLE QStringList FloatVTopicList () const
 Get the topic list.
 
void LoadConfig (const tinyxml2::XMLElement *_pluginElem) override
 
Q_INVOKABLE QColor MaxColor () const
 Get the maximum color.
 
Q_INVOKABLE float MaxFloatV () const
 Get the maximum value.
 
Q_INVOKABLE QColor MinColor () const
 Get the minimum color.
 
Q_INVOKABLE float MinFloatV () const
 Get the minimum value.
 
void OnFloatV (const msgs::Float_V &_msg)
 Callback function for float vector topic.
 
void OnFloatVService (const msgs::Float_V &_msg, bool _result)
 Callback function for point cloud service.
 
Q_INVOKABLE void OnFloatVTopic (const QString &_topicName)
 Set topic to subscribe to for float vectors.
 
void OnPointCloud (const msgs::PointCloudPacked &_msg)
 Callback function for point cloud topic.
 
void OnPointCloudService (const msgs::PointCloudPacked &_msg, bool _result)
 Callback function for point cloud service.
 
Q_INVOKABLE void OnPointCloudTopic (const QString &_topicName)
 Set topic to subscribe to for point cloud.
 
Q_INVOKABLE void OnRefresh ()
 Callback when refresh button is pressed.
 
Q_INVOKABLE QStringList PointCloudTopicList () const
 Get the topic list.
 
Q_INVOKABLE float PointSize () const
 Get the point size.
 
Q_INVOKABLE void SetFloatVTopicList (const QStringList &_floatVTopicList)
 Set the topic list from a string.
 
Q_INVOKABLE void SetMaxColor (const QColor &_maxColor)
 Set the maximum color.
 
Q_INVOKABLE void SetMaxFloatV (float _maxFloatV)
 Set the maximum value.
 
Q_INVOKABLE void SetMinColor (const QColor &_minColor)
 Set the minimum color.
 
Q_INVOKABLE void SetMinFloatV (float _minFloatV)
 Set the minimum value.
 
Q_INVOKABLE void SetPointCloudTopicList (const QStringList &_pointCloudTopicList)
 Set the topic list from a string.
 
Q_INVOKABLE void SetPointSize (float _pointSize)
 Set the point size.
 
Q_INVOKABLE void Show (bool _show)
 Set whether to show the point cloud.
 

Properties

QStringList floatVTopicList
 List of topics publishing FloatV messages.
 
QColor maxColor
 Color for maximum value.
 
float maxFloatV
 Maximum value.
 
QColor minColor
 Color for minimum value.
 
float minFloatV
 Minimum value.
 
QStringList pointCloudTopicList
 List of topics publishing PointCloudPacked messages.
 
float pointSize
 Point size.
 

Detailed Description

Visualize gz::msgs::PointCloudPacked messages in a 3D scene.

By default, the whole cloud is displayed using a single color. Users can optionally choose a topic publishing gz::msgs::FloatV messages which will be used to color all points with a color gradient according to their values. The float message must have the same number of elements as the point cloud and be indexed the same way. NaN values on the FloatV message aren't displayed.

Requirements:

Parameters:

  • <point_cloud_topic>: Topic to receive gz::msgs::PointCloudPacked messages.
  • <float_v_topic>: Topic to receive gz::msgs::FloatV messages.

Constructor & Destructor Documentation

◆ PointCloud()

Constructor.

◆ ~PointCloud()

~PointCloud ( )
override

Destructor.

Member Function Documentation

◆ FloatVTopicList()

Q_INVOKABLE QStringList FloatVTopicList ( ) const

Get the topic list.

Returns
List of topics

◆ FloatVTopicListChanged

void FloatVTopicListChanged ( )
signal

Notify that topic list has changed.

◆ LoadConfig()

void LoadConfig ( const tinyxml2::XMLElement *  _pluginElem)
override

◆ MaxColor()

Q_INVOKABLE QColor MaxColor ( ) const

Get the maximum color.

Returns
Maximum color

◆ MaxColorChanged

void MaxColorChanged ( )
signal

Notify that maximum color has changed.

◆ MaxFloatV()

Q_INVOKABLE float MaxFloatV ( ) const

Get the maximum value.

Returns
Maximum value

◆ MaxFloatVChanged

void MaxFloatVChanged ( )
signal

Notify that maximum value has changed.

◆ MinColor()

Q_INVOKABLE QColor MinColor ( ) const

Get the minimum color.

Returns
Minimum color

◆ MinColorChanged

void MinColorChanged ( )
signal

Notify that minimum color has changed.

◆ MinFloatV()

Q_INVOKABLE float MinFloatV ( ) const

Get the minimum value.

Returns
Minimum value

◆ MinFloatVChanged

void MinFloatVChanged ( )
signal

Notify that minimum value has changed.

◆ OnFloatV()

void OnFloatV ( const msgs::Float_V &  _msg)

Callback function for float vector topic.

Parameters
[in]_msgFloat vector message

◆ OnFloatVService()

void OnFloatVService ( const msgs::Float_V &  _msg,
bool  _result 
)

Callback function for point cloud service.

Parameters
[in]_msgFloat vector message
[out]_resultTrue on success.

◆ OnFloatVTopic()

Q_INVOKABLE void OnFloatVTopic ( const QString _topicName)

Set topic to subscribe to for float vectors.

Parameters
[in]_topicNameName of selected topic

◆ OnPointCloud()

void OnPointCloud ( const msgs::PointCloudPacked &  _msg)

Callback function for point cloud topic.

Parameters
[in]_msgPoint cloud message

◆ OnPointCloudService()

void OnPointCloudService ( const msgs::PointCloudPacked &  _msg,
bool  _result 
)

Callback function for point cloud service.

Parameters
[in]_msgPoint cloud message
[out]_resultTrue on success.

◆ OnPointCloudTopic()

Q_INVOKABLE void OnPointCloudTopic ( const QString _topicName)

Set topic to subscribe to for point cloud.

Parameters
[in]_topicNameName of selected topic

◆ OnRefresh()

Q_INVOKABLE void OnRefresh ( )

Callback when refresh button is pressed.

◆ PointCloudTopicList()

Q_INVOKABLE QStringList PointCloudTopicList ( ) const

Get the topic list.

Returns
List of topics

◆ PointCloudTopicListChanged

void PointCloudTopicListChanged ( )
signal

Notify that topic list has changed.

◆ PointSize()

Q_INVOKABLE float PointSize ( ) const

Get the point size.

Returns
Maximum value

◆ PointSizeChanged

void PointSizeChanged ( )
signal

Notify that point size has changed.

◆ SetFloatVTopicList()

Q_INVOKABLE void SetFloatVTopicList ( const QStringList _floatVTopicList)

Set the topic list from a string.

Parameters
[in]_floatVTopicListList of topics.

◆ SetMaxColor()

Q_INVOKABLE void SetMaxColor ( const QColor _maxColor)

Set the maximum color.

Parameters
[in]_maxColorMaximum color.

◆ SetMaxFloatV()

Q_INVOKABLE void SetMaxFloatV ( float  _maxFloatV)

Set the maximum value.

Parameters
[in]_maxFloatVMaximum value.

◆ SetMinColor()

Q_INVOKABLE void SetMinColor ( const QColor _minColor)

Set the minimum color.

Parameters
[in]_minColorMinimum color.

◆ SetMinFloatV()

Q_INVOKABLE void SetMinFloatV ( float  _minFloatV)

Set the minimum value.

Parameters
[in]_minFloatVMinimum value.

◆ SetPointCloudTopicList()

Q_INVOKABLE void SetPointCloudTopicList ( const QStringList _pointCloudTopicList)

Set the topic list from a string.

Parameters
[in]_pointCloudTopicListList of topics.

◆ SetPointSize()

Q_INVOKABLE void SetPointSize ( float  _pointSize)

Set the point size.

Parameters
[in]_pointSizeMaximum value.

◆ Show()

Q_INVOKABLE void Show ( bool  _show)

Set whether to show the point cloud.

Parameters
[in]_showBoolean value for displaying the points.

Property Documentation

◆ floatVTopicList

QStringList floatVTopicList
readwrite

List of topics publishing FloatV messages.

◆ maxColor

QColor maxColor
readwrite

Color for maximum value.

◆ maxFloatV

float maxFloatV
readwrite

Maximum value.

◆ minColor

QColor minColor
readwrite

Color for minimum value.

◆ minFloatV

float minFloatV
readwrite

Minimum value.

◆ pointCloudTopicList

QStringList pointCloudTopicList
readwrite

List of topics publishing PointCloudPacked messages.

◆ pointSize

float pointSize
readwrite

Point size.


The documentation for this class was generated from the following file: