#include <GridMapVisual.hpp>
|
using | ColorArray = Eigen::Array< Ogre::ColourValue, Eigen::Dynamic, Eigen::Dynamic > |
|
using | MaskArray = Eigen::Array< bool, Eigen::Dynamic, Eigen::Dynamic > |
|
|
void | computeVisualization (float alpha, bool showGridLines, bool flatTerrain, std::string heightLayer, bool flatColor, bool noColor, Ogre::ColourValue meshColor, bool mapLayerColor, std::string colorLayer, bool useRainbow, bool invertRainbow, Ogre::ColourValue minColor, Ogre::ColourValue maxColor, bool autocomputeIntensity, float minIntensity, float maxIntensity) |
|
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 (Eigen::Ref< const grid_map::Matrix > heightData, Eigen::Ref< const grid_map::Matrix > colorData, GridMapVisual::ColoringMethod coloringMethod, Ogre::ColourValue flatColor, double minIntensity, double maxIntensity, bool autocomputeIntensity, Ogre::ColourValue minColor, Ogre::ColourValue maxColor) |
|
MaskArray | computeIsValidMask (std::vector< std::string > basicLayers) |
|
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) |
|
Definition at line 31 of file GridMapVisual.hpp.
Enumerator |
---|
FLAT |
|
COLOR_LAYER |
|
INTENSITY_LAYER_MANUAL |
|
INTENSITY_LAYER_RAINBOW |
|
INTENSITY_LAYER_INVERTED_RAINBOW |
|
Definition at line 56 of file GridMapVisual.hpp.
grid_map_rviz_plugin::GridMapVisual::GridMapVisual |
( |
Ogre::SceneManager * |
sceneManager, |
|
|
Ogre::SceneNode * |
parentNode |
|
) |
| |
grid_map_rviz_plugin::GridMapVisual::~GridMapVisual |
( |
| ) |
|
|
virtual |
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. |
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 255 of file GridMapVisual.cpp.
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 308 of file GridMapVisual.cpp.
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, |
|
|
bool |
useRainbow, |
|
|
bool |
invertRainbow, |
|
|
Ogre::ColourValue |
minColor, |
|
|
Ogre::ColourValue |
maxColor, |
|
|
bool |
autocomputeIntensity, |
|
|
float |
minIntensity, |
|
|
float |
maxIntensity |
|
) |
| |
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 360 of file GridMapVisual.cpp.
std::vector< std::string > grid_map_rviz_plugin::GridMapVisual::getLayerNames |
( |
| ) |
|
Ogre::ColourValue grid_map_rviz_plugin::GridMapVisual::getRainbowColor |
( |
float |
intensity | ) |
|
|
staticprivate |
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 233 of file GridMapVisual.cpp.
void grid_map_rviz_plugin::GridMapVisual::initializeMeshLines |
( |
size_t |
cols, |
|
|
size_t |
rows, |
|
|
double |
resolution, |
|
|
double |
alpha |
|
) |
| |
|
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. |
Definition at line 299 of file GridMapVisual.cpp.
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 328 of file GridMapVisual.cpp.
void grid_map_rviz_plugin::GridMapVisual::setFrameOrientation |
( |
const Ogre::Quaternion & |
orientation | ) |
|
void grid_map_rviz_plugin::GridMapVisual::setFramePosition |
( |
const Ogre::Vector3 & |
position | ) |
|
void grid_map_rviz_plugin::GridMapVisual::setMessage |
( |
const grid_map_msgs::GridMap::ConstPtr & |
msg | ) |
|
Ogre::SceneNode* grid_map_rviz_plugin::GridMapVisual::frameNode_ |
|
private |
bool grid_map_rviz_plugin::GridMapVisual::haveMap_ |
|
private |
Ogre::ManualObject* grid_map_rviz_plugin::GridMapVisual::manualObject_ |
|
private |
Ogre::MaterialPtr grid_map_rviz_plugin::GridMapVisual::material_ |
|
private |
std::string grid_map_rviz_plugin::GridMapVisual::materialName_ |
|
private |
Ogre::SceneManager* grid_map_rviz_plugin::GridMapVisual::sceneManager_ |
|
private |
The documentation for this class was generated from the following files: