#include <GridMapVisual.hpp>
|
| void | computeVisualization (float alpha, bool showGridLines, bool flatTerrain, std::string heightLayer, bool flatColor, bool noColor, Ogre::ColourValue meshColor, bool mapLayerColor, std::string colorLayer, std::string colorMap, bool useColorMap, bool invertColorMap, Ogre::ColourValue minColor, Ogre::ColourValue maxColor, bool autocomputeIntensity, float minIntensity, float maxIntensity, float gridLineThickness, int gridCellDecimation) |
| |
| std::vector< std::string > | getLayerNames () |
| |
| | GridMapVisual (Ogre::SceneManager *sceneManager, Ogre::SceneNode *parentNode) |
| |
| void | setFrameOrientation (const Ogre::Quaternion &orientation) |
| |
| void | setFramePosition (const Ogre::Vector3 &position) |
| |
| void | setMessage (const grid_map_msgs::GridMap::ConstPtr &msg) |
| |
| virtual | ~GridMapVisual () |
| |
|
| ColorArray | computeColorValues (MatrixConstRef heightData, MatrixConstRef colorData, ColoringMethod coloringMethod, std::string colorMap, Ogre::ColourValue flatColor, double minIntensity, double maxIntensity, bool autocomputeIntensity, Ogre::ColourValue minColor, Ogre::ColourValue maxColor) |
| |
| MaskArray | computeIsValidMask (std::vector< std::string > basicLayers) |
| |
| std::vector< Ogre::Vector3 > | computeMeshLineVertices (int i, int j, int gridCellDecimation, bool isNthRow, bool isNthCol, bool isLastRow, bool isLastCol, double resolution, const grid_map::Position &topLeft, const Eigen::ArrayXXf &heightOrFlatData, const MaskArray &isValid) const |
| |
| Ogre::ColourValue | getInterpolatedColor (float intensity, Ogre::ColourValue minColor, Ogre::ColourValue maxColor) |
| |
| void | initializeAndBeginManualObject (size_t nVertices) |
| |
| void | initializeMeshLines (size_t cols, size_t rows, double resolution, double alpha, double lineWidth) |
| |
| void | printMissingBasicLayers (const std::vector< std::string > &basicLayers) const |
| | Logs a warning message which lists the basic layers that are missing from the grid map. More...
|
| |
Definition at line 31 of file GridMapVisual.hpp.
◆ ColorArray
◆ MaskArray
◆ MatrixConstRef
◆ ColoringMethod
| Enumerator |
|---|
| FLAT | |
| COLOR_LAYER | |
| INTENSITY_LAYER_MANUAL | |
| INTENSITY_LAYER_COLORMAP | |
| INTENSITY_LAYER_INVERTED_COLORMAP | |
Definition at line 57 of file GridMapVisual.hpp.
◆ GridMapVisual()
| grid_map_rviz_plugin::GridMapVisual::GridMapVisual |
( |
Ogre::SceneManager * |
sceneManager, |
|
|
Ogre::SceneNode * |
parentNode |
|
) |
| |
◆ ~GridMapVisual()
| grid_map_rviz_plugin::GridMapVisual::~GridMapVisual |
( |
| ) |
|
|
virtual |
◆ computeColorValues()
Computes a matrix of color values corresponding to the grid cells. Color is computed depending on the coloringMethod.
- Parameters
-
| heightData | Height values of the cells. |
| colorData | Values of the layer specified for coloring the mesh. |
| coloringMethod | The strategy to color, see ColoringMethod. |
| colorMap | colorMap selected (string). See GridMapColorMaps.hpp |
| flatColor | Used only if coloringMethod is FLAT |
| minIntensity | Used for the intensity based coloring methods only. |
| maxIntensity | Used for the intensity based coloring methods only. |
| autocomputeIntensity | Wheter to override the values in min and max intensity and compute them based on the provided intensity data. |
| minColor | Used only if coloringMethod is COLOR_LAYER. |
| maxColor | Used only if coloringMethod is COLOR_LAYER. |
- Returns
- The color for each cell.
Definition at line 302 of file GridMapVisual.cpp.
◆ computeIsValidMask()
| GridMapVisual::MaskArray grid_map_rviz_plugin::GridMapVisual::computeIsValidMask |
( |
std::vector< std::string > |
basicLayers | ) |
|
|
private |
Computes a mask where all the provided basicLayers are finite. Used to do fast lockups during mesh creation.
- Parameters
-
| basicLayers | The values to check, if they are finite. |
- Returns
- A boolean mask. True indicates that all layers are finite, false indicates that at least one layer is NAN.
Definition at line 357 of file GridMapVisual.cpp.
◆ computeMeshLineVertices()
| std::vector< Ogre::Vector3 > grid_map_rviz_plugin::GridMapVisual::computeMeshLineVertices |
( |
int |
i, |
|
|
int |
j, |
|
|
int |
gridCellDecimation, |
|
|
bool |
isNthRow, |
|
|
bool |
isNthCol, |
|
|
bool |
isLastRow, |
|
|
bool |
isLastCol, |
|
|
double |
resolution, |
|
|
const grid_map::Position & |
topLeft, |
|
|
const Eigen::ArrayXXf & |
heightOrFlatData, |
|
|
const MaskArray & |
isValid |
|
) |
| const |
|
private |
Returns a vector of ogre coordinates. Each coordinate is a vertex for a mesh line.
- Parameters
-
| i | Index of the current point in x. |
| j | Index of the current point in y. |
| gridCellDecimation | Integer that defines how many cells to skip between mesh lines. E.g. if n=3, every third mesh line will be displayed. |
| isNthRow | Flag to indicate the n-th row, where n = gridCellDecimation. |
| isNthCol | Flag to indicate the n-th column, where n = gridCellDecimation. |
| isLastRow | Flag to indicate the last row. |
| isLastCol | Flag to indicate the last column. |
| resolution | The resolution. |
| topLeft | The (x,y) position of the top left corner in the map. |
| heightOrFlatData | The height data for the elevation (z coordinates). |
| isValid | Mask of indices with valid data (i.e. not nan or inf) |
- Returns
Definition at line 257 of file GridMapVisual.cpp.
◆ computeVisualization()
| void grid_map_rviz_plugin::GridMapVisual::computeVisualization |
( |
float |
alpha, |
|
|
bool |
showGridLines, |
|
|
bool |
flatTerrain, |
|
|
std::string |
heightLayer, |
|
|
bool |
flatColor, |
|
|
bool |
noColor, |
|
|
Ogre::ColourValue |
meshColor, |
|
|
bool |
mapLayerColor, |
|
|
std::string |
colorLayer, |
|
|
std::string |
colorMap, |
|
|
bool |
useColorMap, |
|
|
bool |
invertColorMap, |
|
|
Ogre::ColourValue |
minColor, |
|
|
Ogre::ColourValue |
maxColor, |
|
|
bool |
autocomputeIntensity, |
|
|
float |
minIntensity, |
|
|
float |
maxIntensity, |
|
|
float |
gridLineThickness, |
|
|
int |
gridCellDecimation |
|
) |
| |
◆ getInterpolatedColor()
| Ogre::ColourValue grid_map_rviz_plugin::GridMapVisual::getInterpolatedColor |
( |
float |
intensity, |
|
|
Ogre::ColourValue |
minColor, |
|
|
Ogre::ColourValue |
maxColor |
|
) |
| |
|
private |
Returns a linearly interpolated color between min and max Color with the weighting [0,1] specified by intensity.
- Parameters
-
| intensity | The weighting for interpolation, 0 means minColor, 1 means maxColor. |
| minColor | The lower color for interpolation. |
| maxColor | The upper color for interpolation. |
- Returns
Definition at line 424 of file GridMapVisual.cpp.
◆ getLayerNames()
| std::vector< std::string > grid_map_rviz_plugin::GridMapVisual::getLayerNames |
( |
| ) |
|
◆ getRainbowColor()
| Ogre::ColourValue grid_map_rviz_plugin::GridMapVisual::getRainbowColor |
( |
float |
intensity | ) |
|
|
staticprivate |
◆ initializeAndBeginManualObject()
| void grid_map_rviz_plugin::GridMapVisual::initializeAndBeginManualObject |
( |
size_t |
nVertices | ) |
|
|
private |
Initialized the manualObject if not already initialized and clears all previously added data.
- Parameters
-
| nVertices | An estimate on the number of vertices to be added. |
Definition at line 280 of file GridMapVisual.cpp.
◆ initializeMeshLines()
| void grid_map_rviz_plugin::GridMapVisual::initializeMeshLines |
( |
size_t |
cols, |
|
|
size_t |
rows, |
|
|
double |
resolution, |
|
|
double |
alpha, |
|
|
double |
lineWidth |
|
) |
| |
|
private |
Initialized the meshLines_ object. Should be called before adding lines. Sets the drawing style and allocates the buffer.
- Parameters
-
| cols | Number of columns that will be drawn. |
| rows | Number of rows that will be drawn. |
| resolution | Resolution of the map. Used to compute the line thickness. |
| alpha | Line opacity. |
| lineWidth | line thickness for the mesh lines |
Definition at line 348 of file GridMapVisual.cpp.
◆ normalizeIntensity()
| void grid_map_rviz_plugin::GridMapVisual::normalizeIntensity |
( |
float & |
intensity, |
|
|
float |
minIntensity, |
|
|
float |
maxIntensity |
|
) |
| |
|
staticprivate |
Transforms the intensity into [0,1] range where 0 corresponds to the minIntensity and 1 to maxIntensity. The given value is clipped to that range.
- Parameters
-
| intensity | The intensity value to normalize. |
| minIntensity | Lower bound. |
| maxIntensity | Upper bound. |
Definition at line 392 of file GridMapVisual.cpp.
◆ printMissingBasicLayers()
| void grid_map_rviz_plugin::GridMapVisual::printMissingBasicLayers |
( |
const std::vector< std::string > & |
basicLayers | ) |
const |
|
private |
Logs a warning message which lists the basic layers that are missing from the grid map.
- Parameters
-
Definition at line 367 of file GridMapVisual.cpp.
◆ setFrameOrientation()
| void grid_map_rviz_plugin::GridMapVisual::setFrameOrientation |
( |
const Ogre::Quaternion & |
orientation | ) |
|
◆ setFramePosition()
| void grid_map_rviz_plugin::GridMapVisual::setFramePosition |
( |
const Ogre::Vector3 & |
position | ) |
|
◆ setMessage()
| void grid_map_rviz_plugin::GridMapVisual::setMessage |
( |
const grid_map_msgs::GridMap::ConstPtr & |
msg | ) |
|
◆ frameNode_
| Ogre::SceneNode* grid_map_rviz_plugin::GridMapVisual::frameNode_ |
|
private |
◆ haveMap_
| bool grid_map_rviz_plugin::GridMapVisual::haveMap_ |
|
private |
◆ manualObject_
| Ogre::ManualObject* grid_map_rviz_plugin::GridMapVisual::manualObject_ |
|
private |
◆ map_
◆ material_
| Ogre::MaterialPtr grid_map_rviz_plugin::GridMapVisual::material_ |
|
private |
◆ materialName_
| std::string grid_map_rviz_plugin::GridMapVisual::materialName_ |
|
private |
◆ meshLines_
◆ sceneManager_
| Ogre::SceneManager* grid_map_rviz_plugin::GridMapVisual::sceneManager_ |
|
private |
◆ warningMessageThrottlePeriod_
| constexpr double grid_map_rviz_plugin::GridMapVisual::warningMessageThrottlePeriod_ {10.0} |
|
staticprivate |
The documentation for this class was generated from the following files: