Gazebo Gui

API Reference

9.0.0~pre1

Manages grids in a Gazebo Rendering scene. This plugin can be used for: More...

#include <GridConfig.hh>

Public Slots

QStringList NameList () const
 Get the list of grid names.
 
void OnName (const QString &_name)
 Callback when a new name is chosen on the combo box.
 
void OnRefresh ()
 Callback when refresh button is pressed.
 
void OnShow (bool _checked)
 Callback when checkbox is clicked.
 
void SetColor (double _r, double _g, double _b, double _a)
 Callback to update grid color.
 
void SetNameList (const QStringList &_nameList)
 Set the list of names.
 
void SetPose (double _x, double _y, double _z, double _roll, double _pitch, double _yaw)
 Callback to update grid pose.
 
void UpdateCellLength (double _length)
 Callback to update cell length.
 
void UpdateHCellCount (int _cellCount)
 Callback to update horizontal cell count.
 
void UpdateVCellCount (int _cellCount)
 Callback to update vertical cell count.
 

Signals

void NameListChanged ()
 Notify that name list has changed.
 
void newParams (int _hCellCount, int _vCellCount, double _cellLength, QVector3D _pos, QVector3D _rot, QColor _color)
 Notify QML that grid values have changed.
 

Public Member Functions

 GridConfig ()
 Constructor.
 
 ~GridConfig () override
 Destructor.
 
void ConnectToGrid ()
 Callback to retrieve existing grid.
 
void CreateGrids ()
 Create grids defined at startup.
 
void LoadConfig (const tinyxml2::XMLElement *) override
 
void RefreshList ()
 Refresh list of grids. This is called in the rendering thread.
 
void UpdateGrid ()
 Update grid.
 

Protected Member Functions

bool eventFilter (QObject *_obj, QEvent *_event) override
 

Properties

QStringList nameList
 Name list.
 

Detailed Description

Manages grids in a 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

◆ GridConfig()

Constructor.

◆ ~GridConfig()

~GridConfig ( )
override

Destructor.

Member Function Documentation

◆ ConnectToGrid()

void ConnectToGrid ( )

Callback to retrieve existing grid.

◆ CreateGrids()

void CreateGrids ( )

Create grids defined at startup.

◆ eventFilter()

bool eventFilter ( QObject _obj,
QEvent _event 
)
overrideprotected

◆ LoadConfig()

void LoadConfig ( const tinyxml2::XMLElement *  )
override

◆ NameList

QStringList NameList ( ) const
slot

Get the list of grid names.

Returns
List of grids.

◆ NameListChanged

void NameListChanged ( )
signal

Notify that name list has changed.

◆ newParams

void newParams ( int  _hCellCount,
int  _vCellCount,
double  _cellLength,
QVector3D  _pos,
QVector3D  _rot,
QColor  _color 
)
signal

Notify QML that grid values have changed.

Parameters
[in]_hCellCountHorizontal cell count
[in]_vCellCountVertical cell count
[in]_cellLengthCell length
[in]_posXYZ Position
[in]_rotRPY orientation
[in]_colorGrid color

◆ OnName

void OnName ( const QString _name)
slot

Callback when a new name is chosen on the combo box.

Parameters
[in]_nameGrid name

◆ OnRefresh

void OnRefresh ( )
slot

Callback when refresh button is pressed.

◆ OnShow

void OnShow ( bool  _checked)
slot

Callback when checkbox is clicked.

Parameters
[in]_checkedindicates show or hide grid

◆ RefreshList()

void RefreshList ( )

Refresh list of grids. This is called in the rendering thread.

◆ SetColor

void SetColor ( double  _r,
double  _g,
double  _b,
double  _a 
)
slot

Callback to update grid color.

Parameters
[in]_r,_g,_b,_aRGB color model with fourth alpha channel

◆ SetNameList

void SetNameList ( const QStringList _nameList)
slot

Set the list of names.

Parameters
[in]_nameListList of names

◆ SetPose

void SetPose ( double  _x,
double  _y,
double  _z,
double  _roll,
double  _pitch,
double  _yaw 
)
slot

Callback to update grid pose.

Parameters
[in]_x,_y,_zcartesion coordinates
[in]_roll,_pitch,_yawprincipal coordinates

◆ UpdateCellLength

void UpdateCellLength ( double  _length)
slot

Callback to update cell length.

Parameters
[in]_lengthnew cell length

◆ UpdateGrid()

void UpdateGrid ( )

Update grid.

◆ UpdateHCellCount

void UpdateHCellCount ( int  _cellCount)
slot

Callback to update horizontal cell count.

Parameters
[in]_cellCountnew horizontal cell count

◆ UpdateVCellCount

void UpdateVCellCount ( int  _cellCount)
slot

Callback to update vertical cell count.

Parameters
[in]_cellCountnew vertical cell count

Property Documentation

◆ nameList

QStringList nameList
readwrite

Name list.


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