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

Method World2Map

roborts_costmap/src/costmap_2d.cpp:184–194  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

182}
183
184bool Costmap2D::World2Map(double wx, double wy, unsigned int &mx, unsigned int &my) const {
185 if (wx < origin_x_ || wy < origin_y_) {
186 return false;
187 }
188 mx = (int) ((wx - origin_x_) / resolution_);
189 my = (int) ((wy - origin_y_) / resolution_);
190 if (mx < size_x_ && my < size_y_) {
191 return true;
192 }
193 return false;
194}
195
196void Costmap2D::World2MapNoBoundary(double world_x,
197 double world_y,

Callers 5

RunMethod · 0.80
RunMethod · 0.80
PlanMethod · 0.80
FootprintCostMethod · 0.80
CopyCostMapWindowMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected