14 #include <OGRE/OgreSceneNode.h> 15 #include <OGRE/OgreSceneManager.h> 32 "0 is fully transparent, 1.0 is fully opaque.",
this,
36 "Number of prior grid maps to display.",
this,
40 "Show Grid Lines",
true,
"Whether to show the lines connecting the grid cells.",
this,
44 "Select the transformer to use to set the height.",
50 "Height Layer",
"elevation",
"Select the grid map layer to compute the height.",
this,
54 "Select the transformer to use to set the color.",
62 "Color Layer",
"elevation",
"Select the grid map layer to compute the color.",
this,
66 "Color to draw the mesh.",
this,
72 "Whether to use a rainbow of colors or to interpolate between two colors.",
this,
76 "Invert Rainbow",
false,
77 "Whether to invert the rainbow colors.",
this,
81 "Min Color", QColor(0, 0, 0),
"Color to assign to cells with the minimum intensity. " 82 "Actual color is interpolated between this and Max Color.",
87 "Max Color", QColor(255, 255, 255),
"Color to assign to cells with the maximum intensity. " 88 "Actual color is interpolated between Min Color and this.",
93 "Autocompute Intensity Bounds",
true,
94 "Whether to automatically compute the intensity min/max values.",
this,
99 "Minimum possible intensity value, used to interpolate from Min Color to Max Color.",
this,
104 "Max Intensity", 10.0,
105 "Maximum possible intensity value, used to interpolate from Min Color to Max Color.",
this,
195 for (
size_t i = 0; i <
visuals_.size(); i++) {
196 visuals_[i]->computeVisualization(alpha, showGridLines, flatTerrain, heightLayer, flatColor, noColor, meshColor,
197 mapLayerColor, colorLayer, useRainbow, invertRainbow, minColor, maxColor,
198 autocomputeIntensity, minIntensity, maxIntensity);
205 Ogre::Quaternion orientation;
206 Ogre::Vector3 position;
208 position, orientation)) {
209 ROS_DEBUG(
"Error transforming from frame '%s' to frame '%s'", msg->info.header.frame_id.c_str(),
221 visual->setMessage(msg);
222 visual->setFramePosition(position);
223 visual->setFrameOrientation(orientation);
234 std::vector<std::string> layer_names = visual->getLayerNames();
237 for (
size_t i = 0; i < layer_names.size(); i++) {
rviz::ColorProperty * colorProperty_
rviz::BoolProperty * showGridLinesProperty_
rviz::ColorProperty * minColorProperty_
Ogre::ColourValue getOgreColor() const
DisplayContext * context_
rviz::FloatProperty * alphaProperty_
virtual void clearOptions()
virtual ~GridMapDisplay()
rviz::EnumProperty * colorModeProperty_
void updateVisualization()
virtual int getInt() const
rviz::IntProperty * historyLengthProperty_
void onInitialize() override
virtual float getFloat() const
virtual void onInitialize()
void updateAutocomputeIntensityBounds()
void addOptionStd(const std::string &option)
rviz::BoolProperty * autocomputeIntensityBoundsProperty_
Ogre::SceneNode * scene_node_
std::string getStdString()
virtual bool getBool() const
void updateHistoryLength()
rviz::ColorProperty * maxColorProperty_
virtual void addOption(const QString &option, int value=0)
virtual FrameManager * getFrameManager() const =0
rviz::BoolProperty * invertRainbowProperty_
virtual Ogre::SceneManager * getSceneManager() const =0
virtual void setHidden(bool hidden)
rviz::BoolProperty * useRainbowProperty_
rviz::EnumProperty * heightModeProperty_
bool getTransform(const Header &header, Ogre::Vector3 &position, Ogre::Quaternion &orientation)
rviz::FloatProperty * minIntensityProperty_
rviz::EditableEnumProperty * colorTransformerProperty_
virtual int getOptionInt()
#define PLUGINLIB_EXPORT_CLASS(class_type, base_class_type)
BoolProperty(const QString &name=QString(), bool default_value=false, const QString &description=QString(), Property *parent=0, const char *changed_slot=0, QObject *receiver=0)
void processMessage(const grid_map_msgs::GridMap::ConstPtr &msg)
boost::circular_buffer< boost::shared_ptr< GridMapVisual > > visuals_
rviz::FloatProperty * maxIntensityProperty_
rviz::EditableEnumProperty * heightTransformerProperty_