MCPcopy Create free account
hub / github.com/RoboMaster/RoboRTS / InterpretValue

Method InterpretValue

roborts_costmap/src/static_layer.cpp:132–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130}
131
132unsigned 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
147void StaticLayer::Activate() {
148 OnInitialize();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected