11 #include <OGRE/OgreMaterial.h> 12 #include <OGRE/OgreSharedPtr.h> 14 #include <grid_map_msgs/GridMap.h> 33 using MaskArray = Eigen::Array<bool, Eigen::Dynamic, Eigen::Dynamic>;
34 using ColorArray = Eigen::Array<Ogre::ColourValue, Eigen::Dynamic, Eigen::Dynamic>;
36 GridMapVisual(Ogre::SceneManager* sceneManager, Ogre::SceneNode* parentNode);
40 void setMessage(
const grid_map_msgs::GridMap::ConstPtr& msg);
43 void computeVisualization(
float alpha,
bool showGridLines,
bool flatTerrain, std::string heightLayer,
bool flatColor,
bool noColor,
44 Ogre::ColourValue meshColor,
bool mapLayerColor, std::string colorLayer,
bool useRainbow,
bool invertRainbow,
45 Ogre::ColourValue minColor, Ogre::ColourValue maxColor,
bool autocomputeIntensity,
float minIntensity,
49 void setFramePosition(
const Ogre::Vector3& position);
50 void setFrameOrientation(
const Ogre::Quaternion& orientation);
53 std::vector<std::string> getLayerNames();
56 enum class ColoringMethod { FLAT, COLOR_LAYER, INTENSITY_LAYER_MANUAL, INTENSITY_LAYER_RAINBOW, INTENSITY_LAYER_INVERTED_RAINBOW };
78 void initializeAndBeginManualObject(
size_t nVertices);
94 ColorArray computeColorValues(Eigen::Ref<const grid_map::Matrix> heightData, Eigen::Ref<const grid_map::Matrix> colorData,
96 double maxIntensity,
bool autocomputeIntensity, Ogre::ColourValue minColor, Ogre::ColourValue maxColor);
105 void initializeMeshLines(
size_t cols,
size_t rows,
double resolution,
double alpha);
112 MaskArray computeIsValidMask(std::vector<std::string> basicLayers);
121 static void normalizeIntensity(
float& intensity,
float minIntensity,
float maxIntensity);
129 static Ogre::ColourValue getRainbowColor(
float intensity);
138 Ogre::ColourValue getInterpolatedColor(
float intensity, Ogre::ColourValue minColor, Ogre::ColourValue maxColor);
boost::shared_ptr< rviz::BillboardLine > meshLines_
Ogre::SceneManager * sceneManager_
Ogre::MaterialPtr material_
Ogre::ManualObject * manualObject_
std::string materialName_
Eigen::Array< bool, Eigen::Dynamic, Eigen::Dynamic > MaskArray
Ogre::SceneNode * frameNode_
Eigen::Array< Ogre::ColourValue, Eigen::Dynamic, Eigen::Dynamic > ColorArray