Manages grids in an Gazebo Rendering scene. This plugin can be used for: More...
#include <Grid3D.hh>
Public Slots | |
QStringList | NameList () const |
Get the list of grid names. More... | |
void | OnName (const QString &_name) |
Callback when a new name is chosen on the combo box. More... | |
void | OnRefresh () |
Callback when refresh button is pressed. More... | |
void | OnShow (bool _checked) |
Callback when checkbox is clicked. More... | |
void | SetColor (double _r, double _g, double _b, double _a) |
Callback to update grid color. More... | |
void | SetNameList (const QStringList &_nameList) |
Set the list of names. More... | |
void | SetPose (double _x, double _y, double _z, double _roll, double _pitch, double _yaw) |
Callback to update grid pose. More... | |
void | UpdateCellLength (double _length) |
Callback to update cell length. More... | |
void | UpdateHCellCount (int _cellCount) |
Callback to update horizontal cell count. More... | |
void | UpdateVCellCount (int _cellCount) |
Callback to update vertical cell count. More... | |
Signals | |
void | NameListChanged () |
Notify that name list has changed. More... | |
void | newParams (int _hCellCount, int _vCellCount, double _cellLength, QVector3D _pos, QVector3D _rot, QColor _color) |
Notify QML that grid values have changed. More... | |
Public Member Functions | |
Grid3D () | |
Constructor. More... | |
~Grid3D () override | |
Destructor. More... | |
void | ConnectToGrid () |
Callback to retrieve existing grid. More... | |
void | CreateGrids () |
Create grids defined at startup. More... | |
virtual void | LoadConfig (const tinyxml2::XMLElement *_pluginElem) override |
Load the plugin with a configuration file. Override this on custom plugins to handle custom configurations. More... | |
void | RefreshList () |
Refresh list of grids. This is called in the rendering thread. More... | |
void | UpdateGrid () |
Update grid. More... | |
Public Member Functions inherited from Plugin | |
Plugin () | |
Constructor. More... | |
virtual | ~Plugin () |
Destructor. More... | |
QQuickItem * | CardItem () const |
Get the card item which contains this plugin. The item is generated the first time this function is run. More... | |
virtual std::string | ConfigStr () |
Get the configuration XML as a string. More... | |
QQmlContext * | Context () const |
Get the QML context where the plugin was created. More... | |
bool | DeleteLaterRequested () const |
Get the value of the the delete_later element from the configuration file, which defaults to false. More... | |
void | Load (const tinyxml2::XMLElement *_pluginElem) |
Load the plugin with a configuration file. This loads the default parameters and then calls LoadConfig(), which should be overridden to load custom parameters. More... | |
QQuickItem * | PluginItem () const |
Get the plugin item. More... | |
void | PostParentChanges () |
Apply changes which should come after the plugin already has a parent. More... | |
virtual std::string | Title () const |
Get title. More... | |
Public Member Functions inherited from QObject | |
QObject (QObject *parent) | |
QObject (QObject *parent, const char *name) | |
virtual | ~QObject () |
bool | blockSignals (bool block) |
QObject * | child (const char *objName, const char *inheritsClass, bool recursiveSearch) const |
const QObjectList & | children () const |
const char * | className () const |
bool | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const |
void | deleteLater () |
void | destroyed (QObject *obj) |
bool | disconnect (const char *signal, const QObject *receiver, const char *method) |
bool | disconnect (const QObject *receiver, const char *method) |
void | dumpObjectInfo () |
void | dumpObjectTree () |
QList< QByteArray > | dynamicPropertyNames () const |
virtual bool | event (QEvent *e) |
T | findChild (const QString &name) const |
QList< T > | findChildren (const QRegExp ®Exp) const |
QList< T > | findChildren (const QString &name) const |
bool | inherits (const char *className) const |
void | insertChild (QObject *object) |
void | installEventFilter (QObject *filterObj) |
bool | isA (const char *className) const |
bool | isWidgetType () const |
void | killTimer (int id) |
virtual const QMetaObject * | metaObject () const |
void | moveToThread (QThread *targetThread) |
const char * | name () const |
const char * | name (const char *defaultName) const |
QString | objectName () const |
QObject * | parent () const |
QVariant | property (const char *name) const |
void | removeChild (QObject *object) |
void | removeEventFilter (QObject *obj) |
void | setName (const char *name) |
void | setObjectName (const QString &name) |
void | setParent (QObject *parent) |
bool | setProperty (const char *name, const QVariant &value) |
bool | signalsBlocked () const |
int | startTimer (int interval) |
QThread * | thread () const |
Protected Member Functions | |
bool | eventFilter (QObject *_obj, QEvent *_event) override |
Protected Member Functions inherited from Plugin | |
void | DeleteLater () |
Wait until the plugin has a parent, then close and delete the parent. More... | |
Protected Member Functions inherited from QObject | |
bool | checkConnectArgs (const char *signal, const QObject *object, const char *method) |
virtual void | childEvent (QChildEvent *event) |
virtual void | connectNotify (const char *signal) |
virtual void | customEvent (QEvent *event) |
virtual void | disconnectNotify (const char *signal) |
int | receivers (const char *signal) const |
QObject * | sender () const |
int | senderSignalIndex () const |
virtual void | timerEvent (QTimerEvent *event) |
Properties | |
QStringList | nameList |
Name list. More... | |
Properties inherited from QObject | |
objectName | |
Additional Inherited Members | |
Static Public Member Functions inherited from QObject | |
bool | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
bool | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
QString | tr (const char *sourceText, const char *disambiguation, int n) |
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
Static Protected Member Functions inherited from QObject | |
QByteArray | normalizeSignalSlot (const char *signalSlot) |
Protected Attributes inherited from Plugin | |
std::string | configStr |
XML configuration. More... | |
std::string | title = "" |
Title to be displayed on top of plugin. More... | |
Detailed Description
Manages grids in an Gazebo Rendering scene. This plugin can be used for:
- Introspecting grids
- Editing grids
Configuration
- <insert> : One grid will be inserted at startup for each <insert> tag.
- <horizontal_cell_count> : Number of cells in the horizontal direction, defaults to 20.
- <vertical_cell_count> : Number of cells in the vertical direction, defaults to 0;
- <cell_length> : Length of each cell, defaults to 1.
- <pose> : Grid pose, defaults to the origin.
- <color> : Grid color, defaults to (0.7, 0.7, 0.7, 1.0)
Constructor & Destructor Documentation
◆ Grid3D()
Grid3D | ( | ) |
Constructor.
◆ ~Grid3D()
|
override |
Destructor.
Member Function Documentation
◆ ConnectToGrid()
void ConnectToGrid | ( | ) |
Callback to retrieve existing grid.
◆ CreateGrids()
void CreateGrids | ( | ) |
Create grids defined at startup.
◆ eventFilter()
Reimplemented from QObject.
◆ LoadConfig()
|
overridevirtual |
◆ NameList
|
slot |
Get the list of grid names.
- Returns
- List of grids.
◆ NameListChanged
|
signal |
Notify that name list has changed.
◆ newParams
|
signal |
Notify QML that grid values have changed.
- Parameters
-
[in] _hCellCount Horizontal cell count [in] _vCellCount Vertical cell count [in] _cellLength Cell length [in] _pos XYZ Position [in] _rot RPY orientation [in] _color Grid color
◆ OnName
|
slot |
Callback when a new name is chosen on the combo box.
- Parameters
-
[in] _name Grid name
◆ OnRefresh
|
slot |
Callback when refresh button is pressed.
◆ OnShow
|
slot |
Callback when checkbox is clicked.
- Parameters
-
[in] _checked indicates show or hide grid
◆ RefreshList()
void RefreshList | ( | ) |
Refresh list of grids. This is called in the rendering thread.
◆ SetColor
|
slot |
Callback to update grid color.
- Parameters
-
[in] _r,_g,_b,_a RGB color model with fourth alpha channel
◆ SetNameList
|
slot |
Set the list of names.
- Parameters
-
[in] _nameList List of names
◆ SetPose
|
slot |
Callback to update grid pose.
- Parameters
-
[in] _x,_y,_z cartesion coordinates [in] _roll,_pitch,_yaw principal coordinates
◆ UpdateCellLength
|
slot |
Callback to update cell length.
- Parameters
-
[in] _length new cell length
◆ UpdateGrid()
void UpdateGrid | ( | ) |
Update grid.
◆ UpdateHCellCount
|
slot |
Callback to update horizontal cell count.
- Parameters
-
[in] _cellCount new horizontal cell count
◆ UpdateVCellCount
|
slot |
Callback to update vertical cell count.
- Parameters
-
[in] _cellCount new vertical cell count
Property Documentation
◆ nameList
|
readwrite |
Name list.
The documentation for this class was generated from the following file: