| 130 | } |
| 131 | |
| 132 | unsigned char StaticLayer::InterpretValue(unsigned char value) { |
| 133 | // check if the static value is above the unknown or lethal thresholds |
| 134 | if (track_unknown_space_ && value == unknown_cost_value_) |
| 135 | return NO_INFORMATION; |
| 136 | else if (!track_unknown_space_ && value == unknown_cost_value_) |
| 137 | return FREE_SPACE; |
| 138 | else if (value >= lethal_threshold_) |
| 139 | return LETHAL_OBSTACLE; |
| 140 | else if (trinary_costmap_) |
| 141 | return FREE_SPACE; |
| 142 | |
| 143 | double scale = (double) value / lethal_threshold_; |
| 144 | return scale * LETHAL_OBSTACLE; |
| 145 | } |
| 146 | |
| 147 | void StaticLayer::Activate() { |
| 148 | OnInitialize(); |
nothing calls this directly
no outgoing calls
no test coverage detected