| 27 | namespace grid_map_rviz_plugin { |
| 28 | |
| 29 | GridMapDisplay::GridMapDisplay() |
| 30 | { |
| 31 | alphaProperty_ = new rviz::FloatProperty("Alpha", 1.0, |
| 32 | "0 is fully transparent, 1.0 is fully opaque.", this, |
| 33 | SLOT(updateVisualization())); |
| 34 | |
| 35 | historyLengthProperty_ = new rviz::IntProperty("History Length", 1, |
| 36 | "Number of prior grid maps to display.", this, |
| 37 | SLOT(updateHistoryLength())); |
| 38 | |
| 39 | showGridLinesProperty_ = new rviz::BoolProperty( |
| 40 | "Show Grid Lines", true, "Whether to show the lines connecting the grid cells.", this, |
| 41 | SLOT(updateVisualization())); |
| 42 | |
| 43 | heightModeProperty_ = new rviz::EnumProperty("Height Transformer", "GridMapLayer", |
| 44 | "Select the transformer to use to set the height.", |
| 45 | this, SLOT(updateHeightMode())); |
| 46 | heightModeProperty_->addOption("Layer", 0); |
| 47 | heightModeProperty_->addOption("Flat", 1); |
| 48 | |
| 49 | heightTransformerProperty_ = new rviz::EditableEnumProperty( |
| 50 | "Height Layer", "elevation", "Select the grid map layer to compute the height.", this, |
| 51 | SLOT(updateVisualization())); |
| 52 | |
| 53 | colorModeProperty_ = new rviz::EnumProperty("Color Transformer", "GridMapLayer", |
| 54 | "Select the transformer to use to set the color.", |
| 55 | this, SLOT(updateColorMode())); |
| 56 | colorModeProperty_->addOption("IntensityLayer", 0); |
| 57 | colorModeProperty_->addOption("ColorLayer", 1); |
| 58 | colorModeProperty_->addOption("FlatColor", 2); |
| 59 | colorModeProperty_->addOption("None", 3); |
| 60 | |
| 61 | colorTransformerProperty_ = new rviz::EditableEnumProperty( |
| 62 | "Color Layer", "elevation", "Select the grid map layer to compute the color.", this, |
| 63 | SLOT(updateVisualization())); |
| 64 | |
| 65 | colorProperty_ = new rviz::ColorProperty("Color", QColor(200, 200, 200), |
| 66 | "Color to draw the mesh.", this, |
| 67 | SLOT(updateVisualization())); |
| 68 | colorProperty_->hide(); |
| 69 | |
| 70 | useRainbowProperty_ = new rviz::BoolProperty( |
| 71 | "Use Rainbow", true, |
| 72 | "Whether to use a rainbow of colors or to interpolate between two colors.", this, |
| 73 | SLOT(updateUseRainbow())); |
| 74 | |
| 75 | invertRainbowProperty_ = new rviz::BoolProperty( |
| 76 | "Invert Rainbow", false, |
| 77 | "Whether to invert the rainbow colors.", this, |
| 78 | SLOT(updateVisualization())); |
| 79 | |
| 80 | minColorProperty_ = new rviz::ColorProperty( |
| 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.", |
| 83 | this, SLOT(updateVisualization())); |
| 84 | minColorProperty_->hide(); |
| 85 | |
| 86 | maxColorProperty_ = new rviz::ColorProperty( |
nothing calls this directly
no outgoing calls
no test coverage detected