00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 #ifndef NAV_GRID_PUB_SUB_COST_INTERPRETATION_TABLES_H
00036 #define NAV_GRID_PUB_SUB_COST_INTERPRETATION_TABLES_H
00037
00038 #include <vector>
00039
00040 namespace nav_grid_pub_sub
00041 {
00045 static std::vector<unsigned char> RAW(0);
00046
00052 static std::vector<unsigned char> NEGATE =
00053 {
00054
00055 255, 254, 253, 252, 251, 250, 249, 248, 247, 246,
00056 245, 244, 243, 242, 241, 240, 239, 238, 237, 236,
00057 235, 234, 233, 232, 231, 230, 229, 228, 227, 226,
00058 225, 224, 223, 222, 221, 220, 219, 218, 217, 216,
00059 215, 214, 213, 212, 211, 210, 209, 208, 207, 206,
00060 205, 204, 203, 202, 201, 200, 199, 198, 197, 196,
00061 195, 194, 193, 192, 191, 190, 189, 188, 187, 186,
00062 185, 184, 183, 182, 181, 180, 179, 178, 177, 176,
00063 175, 174, 173, 172, 171, 170, 169, 168, 167, 166,
00064 165, 164, 163, 162, 161, 160, 159, 158, 157, 156,
00065 155, 154, 153, 152, 151, 150, 149, 148, 147, 146,
00066 145, 144, 143, 142, 141, 140, 139, 138, 137, 136,
00067 135, 134, 133, 132, 131, 130, 129, 128, 127, 126,
00068 125, 124, 123, 122, 121, 120, 119, 118, 117, 116,
00069 115, 114, 113, 112, 111, 110, 109, 108, 107, 106,
00070 105, 104, 103, 102, 101, 100, 99, 98, 97, 96,
00071 95, 94, 93, 92, 91, 90, 89, 88, 87, 86,
00072 85, 84, 83, 82, 81, 80, 79, 78, 77, 76,
00073 75, 74, 73, 72, 71, 70, 69, 68, 67, 66,
00074 65, 64, 63, 62, 61, 60, 59, 58, 57, 56,
00075 55, 54, 53, 52, 51, 50, 49, 48, 47, 46,
00076 45, 44, 43, 42, 41, 40, 39, 38, 37, 36,
00077 35, 34, 33, 32, 31, 30, 29, 28, 27, 26,
00078 25, 24, 23, 22, 21, 20, 19, 18, 17, 16,
00079 15, 14, 13, 12, 11, 10, 9, 8, 7, 6,
00080 5, 4, 3, 2, 1, 0
00081 };
00082
00088 std::vector<unsigned char> getOccupancyInput(bool trinary = false, bool use_unknown_value = false);
00089
00097 static std::vector<unsigned char> OCC_GRID_PUBLISHING =
00098 {
00099
00100 0,
00101
00102 1, 1, 1, 2, 2, 2, 3, 3, 4, 4,
00103 4, 5, 5, 6, 6, 6, 7, 7, 7, 8,
00104 8, 9, 9, 9, 10, 10, 11, 11, 11, 12,
00105 12, 12, 13, 13, 14, 14, 14, 15, 15, 16,
00106 16, 16, 17, 17, 18, 18, 18, 19, 19, 19,
00107 20, 20, 21, 21, 21, 22, 22, 23, 23, 23,
00108 24, 24, 24, 25, 25, 26, 26, 26, 27, 27,
00109 28, 28, 28, 29, 29, 29, 30, 30, 31, 31,
00110 31, 32, 32, 33, 33, 33, 34, 34, 35, 35,
00111 35, 36, 36, 36, 37, 37, 38, 38, 38, 39,
00112 39, 40, 40, 40, 41, 41, 41, 42, 42, 43,
00113 43, 43, 44, 44, 45, 45, 45, 46, 46, 46,
00114 47, 47, 48, 48, 48, 49, 49, 50, 50, 50,
00115 51, 51, 52, 52, 52, 53, 53, 53, 54, 54,
00116 55, 55, 55, 56, 56, 57, 57, 57, 58, 58,
00117 58, 59, 59, 60, 60, 60, 61, 61, 62, 62,
00118 62, 63, 63, 63, 64, 64, 65, 65, 65, 66,
00119 66, 67, 67, 67, 68, 68, 69, 69, 69, 70,
00120 70, 70, 71, 71, 72, 72, 72, 73, 73, 74,
00121 74, 74, 75, 75, 75, 76, 76, 77, 77, 77,
00122 78, 78, 79, 79, 79, 80, 80, 80, 81, 81,
00123 82, 82, 82, 83, 83, 84, 84, 84, 85, 85,
00124 86, 86, 86, 87, 87, 87, 88, 88, 89, 89,
00125 89, 90, 90, 91, 91, 91, 92, 92, 92, 93,
00126 93, 94, 94, 94, 95, 95, 96, 96, 96, 97,
00127 97, 98,
00128
00129 99,
00130
00131 100,
00132
00133 255
00134 };
00135
00141 std::vector<unsigned char> pixelColoringInterpretation(const double free_threshold,
00142 const double occupied_threshold);
00143
00149 std::vector<unsigned char> grayScaleInterpretation(const double free_threshold, const double occupied_threshold);
00150
00156 static std::vector<unsigned char> TRINARY_SAVE =
00157 {
00158
00159 255,
00160
00161 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
00162 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
00163 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
00164 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
00165 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
00166 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
00167 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
00168 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
00169 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
00170 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
00171 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
00172 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
00173 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
00174 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
00175 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
00176 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
00177 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
00178 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
00179 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
00180 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
00181 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
00182 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
00183 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
00184 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
00185 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
00186 205, 205, 205,
00187
00188 0,
00189
00190 205
00191 };
00192
00198 static std::vector<unsigned char> SCALE_SAVE =
00199 {
00200
00201 254,
00202
00203 252, 250, 247, 245, 242, 240, 237, 234, 232, 229,
00204 227, 224, 221, 219, 216, 214, 211, 209, 206, 203,
00205 201, 198, 196, 193, 190, 188, 185, 183, 180, 178,
00206 175, 172, 170, 167, 165, 162, 159, 157, 154, 152,
00207 149, 147, 144, 141, 139, 136, 134, 131, 129, 126,
00208 123, 121, 118, 116, 113, 110, 108, 105, 103, 100,
00209 98, 95, 92, 90, 87, 85, 82, 79, 77, 74,
00210 72, 69, 67, 64, 61, 59, 56, 54, 51, 48,
00211 46, 43, 41, 38, 36, 33, 30, 28, 25, 23,
00212 20, 17, 15, 12, 10, 7, 5, 2, 1,
00213
00214 0,
00215
00216 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
00217 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
00218 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
00219 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
00220 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
00221 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
00222 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
00223 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
00224 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
00225 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
00226 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
00227 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
00228 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
00229 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
00230 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
00231 205, 205, 205, 205, 205
00232 };
00233
00234 }
00235
00236 #endif // NAV_GRID_PUB_SUB_COST_INTERPRETATION_TABLES_H