test_distance_map.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2021, the neonavigation authors
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  *
8  * * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  * * Redistributions in binary form must reproduce the above copyright
11  * notice, this list of conditions and the following disclaimer in the
12  * documentation and/or other materials provided with the distribution.
13  * * Neither the name of the copyright holder nor the names of its
14  * contributors may be used to endorse or promote products derived from
15  * this software without specific prior written permission.
16  *
17  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
21  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27  * POSSIBILITY OF SUCH DAMAGE.
28  */
29 
30 #include <cmath>
31 #include <limits>
32 #include <string>
33 #include <vector>
34 
35 #include <gtest/gtest.h>
36 
37 #include <omp.h>
38 
39 #include <costmap_cspace_msgs/MapMetaData3D.h>
44 
46 
47 namespace planner_cspace
48 {
49 namespace planner_3d
50 {
52 using Astar = GridAstar<3, 2>;
53 
54 class DistanceMapTest : public ::testing::Test
55 {
56 protected:
57  const int w_ = 10;
58  const int h_ = 10;
59  const int angle_ = 10;
60 
61  const Astar::Vec s_;
62  const Astar::Vec e_;
63 
65  const float tolerance_ = 0.4;
66 
67  Astar::Gridmap<char, 0x80> cm_rough_;
69 
71 
73  : s_(2, 2, 0)
74  , e_(8, 8, 0)
75  , ec_(0.5f, 0.5f, 0.2f)
78  {
79  const int range = 4;
80  const int local_range = 10;
81  omp_set_num_threads(2);
82 
83  costmap_cspace_msgs::MapMetaData3D map_info;
84  map_info.width = w_;
85  map_info.height = h_;
86  map_info.angle = angle_;
87  map_info.linear_resolution = 1.0;
88  map_info.angular_resolution = M_PI * 2 / angle_;
89 
90  CostCoeff cc;
91  cc.weight_costmap_ = 1.0f;
92  cc.weight_remembered_ = 0.0f;
93  cc.angle_resolution_aspect_ = 2.0f / tanf(map_info.angular_resolution);
94  dm_.setParams(cc, 64 * 2);
95 
96  const Astar::Vec size3d(w_, h_, angle_);
97  const Astar::Vec size2d(w_, h_, 1);
98  Astar::Gridmap<char, 0x40> cm;
99  Astar::Gridmap<char, 0x80> cm_hyst;
100  GridAstarModel3D::Ptr model(
101  new GridAstarModel3D(
102  map_info,
103  ec_,
104  local_range,
105  dm_.gridmap(), cm, cm_hyst, cm_rough_,
106  cc, range));
107  cm.reset(size3d);
108  cm_hyst.reset(size3d);
109  cm_rough_.reset(size2d);
110  bbf_costmap_->reset(size2d);
111 
112  cm.clear(0);
113  cm_hyst.clear(0);
114  cm_rough_.clear(0);
115  bbf_costmap_->clear();
116 
117  const DistanceMap::Params dmp =
118  {
119  .euclid_cost = ec_,
120  .range = range,
121  .local_range = local_range,
122  .longcut_range = 10,
123  .size = size2d,
124  .resolution = map_info.linear_resolution,
125  };
126  dm_.init(model, dmp);
127  }
128 
130  {
131  /*
132  [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
133  [ ][S][ ][ ][ ][ ][ ][ ][ ][ ]
134  [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
135  [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
136  [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
137  [X][X][X][ ][X][X][X][X][X][X]
138  [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
139  [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
140  [ ][ ][ ][ ][ ][ ][ ][ ][G][ ]
141  [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
142  */
143  cm_rough_.clear(0);
144  for (int x = 0; x < w_; x++)
145  {
146  cm_rough_[Astar::Vec(x, 5, 0)] = 100;
147  }
148  cm_rough_[Astar::Vec(3, 5, 0)] = 0;
149  }
150 
152  const Astar::Vec p,
153  const float d,
154  const std::string& msg) const
155  {
156  if (p[1] < 5)
157  {
158  ASSERT_NEAR(
159  2.7 + ec_[0] * (p - Astar::Vec(3, 5, 0)).norm(),
160  d, tolerance_)
161  << msg;
162  }
163  else if (p[1] > 5)
164  {
165  ASSERT_NEAR(
166  ec_[0] * (p - e_).norm(),
167  d, tolerance_)
168  << msg;
169  }
170  else if (p == Astar::Vec(3, 5, 0))
171  {
172  ASSERT_NEAR(2.7, d, tolerance_) << msg;
173  }
174  }
175 
176  bool validate(const std::string& msg) const
177  {
178  for (int y = 0; y < h_; y++)
179  {
180  for (int x = 0; x < w_; x++)
181  {
182  const Astar::Vec pos(x, y, 0);
183  validateDistance(pos, dm_[pos], msg + " failed at " + xyStr(x, y));
184  if (::testing::Test::HasFatalFailure())
185  return false;
186  }
187  }
188  return true;
189  }
190 };
191 
193  : public DistanceMapTest,
194  public ::testing::WithParamInterface<std::vector<Vec3>>
195 {
196 };
197 
199  UpdateWithTemporaryObstacles,
201  ::testing::Values(
202  std::vector<Vec3>(
203  {
204  Vec3(7, 7, 0),
205  }), // NOLINT(whitespace/braces)
206  std::vector<Vec3>(
207  {
208  Vec3(4, 2, 0),
209  Vec3(7, 2, 0),
210  }), // NOLINT(whitespace/braces)
211  std::vector<Vec3>(
212  {
213  // goal is unreachable
214  Vec3(3, 5, 0),
215  }), // NOLINT(whitespace/braces)
216  std::vector<Vec3>()));
217 
219 {
220  setupCostmap();
221 
222  dm_.create(s_, e_);
223  debugOutput(dm_, cm_rough_, s_, e_);
224 
225  if (!validate("create"))
226  {
227  debugOutput(dm_, cm_rough_, s_, e_);
228  return;
229  }
230 }
231 
232 TEST_F(DistanceMapTest, StartOutOfMap)
233 {
234  setupCostmap();
235  dm_.create(s_, e_);
236 
237  const DistanceMap::Rect rect(Vec3(1, 1, 0), Vec3(2, 2, 0));
238 
239  dm_.update(Astar::Vec(1000, 1000, 0), e_, rect);
240  dm_.update(Astar::Vec(-1000, 1000, 0), e_, rect);
241  dm_.update(Astar::Vec(-1000, -1000, 0), e_, rect);
242  dm_.update(Astar::Vec(1000, -1000, 0), e_, rect);
243 }
244 
245 TEST_F(DistanceMapTest, GoalOutOfMap)
246 {
247  setupCostmap();
248  dm_.create(s_, e_);
249 
250  const DistanceMap::Rect rect(Vec3(1, 1, 0), Vec3(2, 2, 0));
251 
252  dm_.update(s_, Astar::Vec(1000, 1000, 0), rect);
253  dm_.update(s_, Astar::Vec(-1000, 1000, 0), rect);
254  dm_.update(s_, Astar::Vec(-1000, -1000, 0), rect);
255  dm_.update(s_, Astar::Vec(1000, -1000, 0), rect);
256 }
257 
259 {
260  const std::vector<Vec3> obstacles = GetParam();
261 
262  // Slide update area to check all combination of updated area
263  for (int from_y = 0; from_y < h_; from_y++)
264  {
265  for (int from_x = 0; from_x < w_; from_x++)
266  {
267  const std::string from(xyStr(from_x, from_y));
268  for (int to_y = from_y; to_y < h_; to_y++)
269  {
270  for (int to_x = from_x; to_x < w_; to_x++)
271  {
272  const std::string to(xyStr(to_x, to_y));
273 
274  // Add obstacles to the costmap and create distance map
275  setupCostmap();
276  for (const Vec3& obstacle : obstacles)
277  {
278  if (from_x < obstacle[0] && obstacle[0] < to_x &&
279  from_y < obstacle[1] && obstacle[1] < to_y)
280  {
281  cm_rough_[obstacle] = 100;
282  }
283  }
284  dm_.create(s_, e_);
285 
286  // Reset costmap
287  setupCostmap();
288 
289  // Update multiple times to check idempotence
290  for (int i = 0; i < 5; i++)
291  {
292  dm_.update(
293  s_, e_,
295  Vec3(from_x, from_y, 0), Vec3(to_x, to_y, 0)));
296  if (!validate("update " + from + "-" + to))
297  {
298  debugOutput(dm_, cm_rough_, s_, e_);
299  return;
300  }
301  }
302  }
303  }
304  }
305  }
306 }
307 
308 class DistanceMapTestLongMap : public ::testing::Test
309 {
310 protected:
311  const int w_ = 20;
312  const int h_ = 3;
313  const int angle_ = 10;
314 
315  const int range_ = 2;
316  const int local_range_ = 2;
317  const int longcut_range_ = 2;
318 
320 
321  const int search_range_ = 4;
322 
323  Astar::Gridmap<char, 0x80> cm_rough_;
325 
327 
329  : ec_(0.5f, 0.5f, 0.2f)
332  {
333  costmap_cspace_msgs::MapMetaData3D map_info;
334  map_info.width = w_;
335  map_info.height = h_;
336  map_info.angle = angle_;
337  map_info.linear_resolution = 1.0;
338  map_info.angular_resolution = M_PI * 2 / angle_;
339 
340  CostCoeff cc;
341  cc.weight_costmap_ = 1.0f;
342  cc.weight_remembered_ = 0.0f;
343  cc.angle_resolution_aspect_ = 2.0f / tanf(map_info.angular_resolution);
344  omp_set_num_threads(1);
345  dm_.setParams(cc, 1);
346 
347  const Astar::Vec size3d(w_, h_, angle_);
348  const Astar::Vec size2d(w_, h_, 1);
349  Astar::Gridmap<char, 0x40> cm;
350  Astar::Gridmap<char, 0x80> cm_hyst;
351  GridAstarModel3D::Ptr model(
352  new GridAstarModel3D(
353  map_info,
354  ec_,
355  local_range_,
356  dm_.gridmap(), cm, cm_hyst, cm_rough_,
357  cc, range_));
358  cm.reset(size3d);
359  cm_hyst.reset(size3d);
360  cm_rough_.reset(size2d);
361  bbf_costmap_->reset(size2d);
362  cm.clear(0);
363  cm_hyst.clear(0);
364  cm_rough_.clear(0);
365  bbf_costmap_->clear();
366 
367  const DistanceMap::Params dmp =
368  {
369  .euclid_cost = ec_,
370  .range = range_,
371  .local_range = local_range_,
372  .longcut_range = longcut_range_,
373  .size = size2d,
374  .resolution = map_info.linear_resolution,
375  };
376  dm_.init(model, dmp);
377  }
378 };
379 
381 {
382  const Astar::Vec s(4, 1, 0);
383  const Astar::Vec e(1, 1, 0);
384 
385  const float tolerance = 0.4;
386 
387  const int range_overshoot = range_ + local_range_ + longcut_range_ + search_range_;
388 
389  const auto validate = [this, s, e, tolerance, range_overshoot]()
390  {
391  for (int y = 0; y < h_; y++)
392  {
393  for (int x = 0; x < w_; x++)
394  {
395  const Astar::Vec p(x, y, 0);
396  const float cost = dm_[p];
397  const float d = (p - e).norm();
398  const float d_from_start = (p - s).norm();
399  if (x < s[0] || d_from_start <= range_overshoot)
400  {
401  ASSERT_NEAR(ec_[0] * d, cost, tolerance) << xyStr(x, y);
402  }
403  else if (d_from_start > range_overshoot)
404  {
405  ASSERT_EQ(std::numeric_limits<float>::max(), cost) << xyStr(x, y);
406  }
407  }
408  }
409  };
410 
411  dm_.create(s, e);
412  {
413  SCOPED_TRACE("After create");
414  validate();
415  }
416  if (::testing::Test::HasFatalFailure())
417  debugOutput(dm_, cm_rough_, s, e);
418 
419  dm_.update(
420  s, e,
422  Vec3(8, 0, 0), Vec3(9, 2, 0)));
423  {
424  SCOPED_TRACE("After update");
425  validate();
426  }
427  if (::testing::Test::HasFatalFailure())
428  debugOutput(dm_, cm_rough_, s, e);
429 }
430 
431 TEST_F(DistanceMapTestLongMap, BlockedAndRecovered)
432 {
433  const Astar::Vec s(7, 1, 0);
434  const Astar::Vec e(1, 1, 0);
435 
436  const float tolerance = 0.4;
437 
438  const int range_overshoot = range_ + local_range_ + longcut_range_ + search_range_;
439  const auto validate = [this, s, e, tolerance, range_overshoot](const int obstacle_x)
440  {
441  for (int y = 0; y < h_; y++)
442  {
443  for (int x = 0; x < w_; x++)
444  {
445  const Astar::Vec p(x, y, 0);
446  const float cost = dm_[p];
447  const float d = (p - e).norm();
448  const float d_from_start = (p - s).norm();
449  if ((x < s[0] || d_from_start < range_overshoot) && x < obstacle_x)
450  {
451  ASSERT_NEAR(ec_[0] * d, cost, tolerance) << xyStr(x, y);
452  }
453  else if (x > obstacle_x)
454  {
455  ASSERT_EQ(std::numeric_limits<float>::max(), cost) << xyStr(x, y);
456  }
457  }
458  }
459  };
460 
461  dm_.create(s, e);
462  {
463  SCOPED_TRACE("No obstacle");
464  validate(w_);
465  }
466 
467  for (int y = 0; y < h_; y++)
468  {
469  cm_rough_[Astar::Vec(5, y, 0)] = 100;
470  }
471  dm_.update(
472  s, e,
474  Vec3(5, 0, 0), Vec3(5, 2, 0)));
475  {
476  SCOPED_TRACE("Obstacle at x=5");
477  validate(5);
478  }
479  if (::testing::Test::HasFatalFailure())
480  {
481  debugOutput(dm_, cm_rough_, s, e);
482  return;
483  }
484 
485  cm_rough_.clear(0);
486 
487  dm_.update(
488  s, e,
490  Vec3(5, 0, 0), Vec3(5, 2, 0)));
491  {
492  SCOPED_TRACE("No obstacle");
493  validate(w_);
494  }
495  if (::testing::Test::HasFatalFailure())
496  {
497  debugOutput(dm_, cm_rough_, s, e);
498  return;
499  }
500 }
501 
502 TEST_F(DistanceMapTestLongMap, StartMoveWithoutMapUpdate)
503 {
504  const Astar::Vec e(1, 1, 0);
505 
506  const float tolerance = 0.4;
507 
508  const int range_overshoot = range_ + local_range_ + longcut_range_ + search_range_;
509 
510  const auto validate = [this, e, tolerance, range_overshoot](const Astar::Vec& s)
511  {
512  for (int y = 0; y < h_; y++)
513  {
514  for (int x = 0; x < w_; x++)
515  {
516  const Astar::Vec p(x, y, 0);
517  const float cost = dm_[p];
518  const float d = (p - e).norm();
519  const float d_from_start = (p - s).norm();
520  if (x < s[0] || d_from_start <= range_overshoot)
521  {
522  ASSERT_NEAR(ec_[0] * d, cost, tolerance) << xyStr(x, y);
523  }
524  else if (d_from_start > range_overshoot)
525  {
526  ASSERT_EQ(std::numeric_limits<float>::max(), cost) << xyStr(x, y);
527  }
528  }
529  }
530  };
531 
532  {
533  const Astar::Vec s(2, 1, 0);
534  dm_.create(s, e);
535  SCOPED_TRACE("After create");
536  validate(s);
537  if (::testing::Test::HasFatalFailure())
538  {
539  debugOutput(dm_, cm_rough_, s, e);
540  }
541  }
542  {
543  const Astar::Vec s(2, 1, 0);
544  dm_.update(
545  s, e,
547  Vec3(1, 1, 1), Vec3(0, 0, 0)));
548  SCOPED_TRACE("After update 1");
549  validate(s);
550  if (::testing::Test::HasFatalFailure())
551  {
552  debugOutput(dm_, cm_rough_, s, e);
553  }
554  }
555  {
556  const Astar::Vec s(5, 1, 0);
557  dm_.update(
558  s, e,
560  Vec3(1, 1, 1), Vec3(0, 0, 0)));
561  SCOPED_TRACE("After update 2");
562  validate(s);
563  if (::testing::Test::HasFatalFailure())
564  {
565  debugOutput(dm_, cm_rough_, s, e);
566  }
567  }
568  {
569  const Astar::Vec s(7, 1, 0);
570  dm_.update(
571  s, e,
573  Vec3(1, 1, 1), Vec3(0, 0, 0)));
574  SCOPED_TRACE("After update 3");
575  validate(s);
576  if (::testing::Test::HasFatalFailure())
577  {
578  debugOutput(dm_, cm_rough_, s, e);
579  }
580  }
581 }
582 } // namespace planner_3d
583 } // namespace planner_cspace
584 
585 int main(int argc, char** argv)
586 {
587  testing::InitGoogleTest(&argc, argv);
588 
589  return RUN_ALL_TESTS();
590 }
planner_cspace::planner_3d::CostCoeff
Definition: planner_3d/grid_astar_model.h:51
planner_cspace::planner_3d::TEST_F
TEST_F(DistanceMapTest, Create)
Definition: test_distance_map.cpp:218
planner_cspace::planner_3d::DistanceMapTestLongMap::dm_
DistanceMap dm_
Definition: test_distance_map.cpp:326
planner_cspace::planner_3d::DistanceMapTest::bbf_costmap_
CostmapBBF::Ptr bbf_costmap_
Definition: test_distance_map.cpp:68
planner_cspace
Definition: bbf.h:33
msg
msg
planner_cspace::planner_3d::DistanceMapTest::tolerance_
const float tolerance_
Definition: test_distance_map.cpp:65
planner_cspace::planner_3d::DistanceMapTestLongMap::search_range_
const int search_range_
Definition: test_distance_map.cpp:321
s
XmlRpcServer s
planner_cspace::planner_3d::GridAstarModel3D
Definition: planner_3d/grid_astar_model.h:72
planner_cspace::planner_3d::CostmapBBFImpl
Definition: costmap_bbf.h:62
planner_cspace::planner_3d::DistanceMapTestLongMap::angle_
const int angle_
Definition: test_distance_map.cpp:313
main
int main(int argc, char **argv)
Definition: test_distance_map.cpp:585
planner_cspace::planner_3d::DistanceMapTest::e_
const Astar::Vec e_
Definition: test_distance_map.cpp:62
grid_astar_model.h
planner_cspace::planner_3d::DistanceMapTestLongMap::ec_
const Astar::Vecf ec_
Definition: test_distance_map.cpp:319
validate
ROSCPP_DECL bool validate(const std::string &name, std::string &error)
f
f
planner_cspace::planner_3d::DistanceMapTestLongMap::w_
const int w_
Definition: test_distance_map.cpp:311
costmap_bbf.h
planner_cspace::planner_3d::INSTANTIATE_TEST_CASE_P
INSTANTIATE_TEST_CASE_P(UpdateWithTemporaryObstacles, DistanceMapTestWithParam, ::testing::Values(std::vector< Vec3 >({ Vec3(7, 7, 0), }), std::vector< Vec3 >({ Vec3(4, 2, 0), Vec3(7, 2, 0), }), std::vector< Vec3 >({ Vec3(3, 5, 0), }), std::vector< Vec3 >()))
planner_cspace::planner_3d::CostCoeff::angle_resolution_aspect_
float angle_resolution_aspect_
Definition: planner_3d/grid_astar_model.h:68
planner_cspace::planner_3d::DistanceMapTestLongMap::range_
const int range_
Definition: test_distance_map.cpp:315
distance_map_utils.h
planner_cspace::planner_3d::DistanceMapTest::dm_
DistanceMap dm_
Definition: test_distance_map.cpp:70
planner_cspace::GridAstar< 3, 2 >
planner_cspace::planner_3d::DistanceMapTestWithParam
Definition: test_distance_map.cpp:192
planner_cspace::planner_3d::DistanceMapTestLongMap::cm_rough_
Astar::Gridmap< char, 0x80 > cm_rough_
Definition: test_distance_map.cpp:323
planner_cspace::planner_3d::DistanceMap::Params
Definition: distance_map.h:70
planner_cspace::planner_3d::DistanceMapTest::cm_rough_
Astar::Gridmap< char, 0x80 > cm_rough_
Definition: test_distance_map.cpp:67
d
d
planner_cspace::planner_3d::DistanceMapTest::DistanceMapTest
DistanceMapTest()
Definition: test_distance_map.cpp:72
planner_cspace::planner_3d::CostCoeff::weight_remembered_
float weight_remembered_
Definition: planner_3d/grid_astar_model.h:60
distance_map.h
planner_cspace::planner_3d::TEST_P
TEST_P(DistanceMapTestWithParam, Update)
Definition: test_distance_map.cpp:258
planner_cspace::planner_3d::DistanceMapTest::ec_
const Astar::Vecf ec_
Definition: test_distance_map.cpp:64
planner_cspace::planner_3d::DistanceMapTestLongMap::h_
const int h_
Definition: test_distance_map.cpp:312
planner_cspace::planner_3d::DistanceMapTestLongMap::DistanceMapTestLongMap
DistanceMapTestLongMap()
Definition: test_distance_map.cpp:328
grid_astar.h
planner_cspace::planner_3d::DistanceMapTest::w_
const int w_
Definition: test_distance_map.cpp:57
planner_cspace::planner_3d::DistanceMapTestLongMap::local_range_
const int local_range_
Definition: test_distance_map.cpp:316
planner_cspace::planner_3d::DistanceMapTestLongMap::longcut_range_
const int longcut_range_
Definition: test_distance_map.cpp:317
planner_cspace::planner_3d::DistanceMapTest::angle_
const int angle_
Definition: test_distance_map.cpp:59
planner_cspace::planner_3d::DistanceMap
Definition: distance_map.h:47
planner_cspace::planner_3d::GridAstarModel3D::Ptr
std::shared_ptr< GridAstarModel3D > Ptr
Definition: planner_3d/grid_astar_model.h:76
planner_cspace::planner_3d::DistanceMapTest::setupCostmap
void setupCostmap()
Definition: test_distance_map.cpp:129
planner_cspace::planner_3d::CostCoeff::weight_costmap_
float weight_costmap_
Definition: planner_3d/grid_astar_model.h:57
planner_cspace::planner_3d::DistanceMap::gridmap
const Astar::Gridmap< float > & gridmap() const
Definition: distance_map.h:114
planner_cspace::GridAstar< 3, 2 >::Vec
CyclicVecInt< DIM, NONCYCLIC > Vec
Definition: grid_astar.h:67
planner_cspace::planner_3d::DistanceMap::init
void init(const GridAstarModel3D::Ptr model, const Params &p)
Definition: distance_map.cpp:198
planner_cspace::planner_3d::DistanceMapTest::validate
bool validate(const std::string &msg) const
Definition: test_distance_map.cpp:176
planner_cspace::planner_3d::DistanceMap::setParams
void setParams(const CostCoeff &cc, const int num_cost_estim_task)
Definition: distance_map.cpp:192
planner_cspace::planner_3d::DistanceMap::Rect
Definition: distance_map.h:52
planner_cspace::planner_3d::DistanceMapTest
Definition: test_distance_map.cpp:54
planner_cspace::planner_3d::Vec3
CyclicVecInt< 3, 2 > Vec3
Definition: test_distance_map.cpp:51
planner_cspace::planner_3d::DistanceMapTest::validateDistance
void validateDistance(const Astar::Vec p, const float d, const std::string &msg) const
Definition: test_distance_map.cpp:151
planner_cspace::planner_3d::CostmapBBF::Ptr
std::shared_ptr< CostmapBBF > Ptr
Definition: costmap_bbf.h:47
planner_cspace::planner_3d::DistanceMapTestLongMap
Definition: test_distance_map.cpp:308
planner_cspace::planner_3d::DistanceMapTestLongMap::bbf_costmap_
CostmapBBF::Ptr bbf_costmap_
Definition: test_distance_map.cpp:324
planner_cspace::planner_3d::DistanceMap::Params::euclid_cost
Astar::Vecf euclid_cost
Definition: distance_map.h:72
planner_cspace::planner_3d::DistanceMapTest::h_
const int h_
Definition: test_distance_map.cpp:58
planner_cspace::CyclicVecBase
Definition: cyclic_vec.h:78
planner_cspace::planner_3d::DistanceMapTest::s_
const Astar::Vec s_
Definition: test_distance_map.cpp:61


planner_cspace
Author(s): Atsushi Watanabe
autogenerated on Fri May 16 2025 02:15:23