30 #ifndef PLANNER_CSPACE_DISTANCE_MAP_UTILS_H
31 #define PLANNER_CSPACE_DISTANCE_MAP_UTILS_H
48 inline std::string xyStr(
const float x,
const float y)
50 return "(" + std::to_string(x) +
", " + std::to_string(y) +
")";
53 inline void debugOutput(
55 const Astar::Gridmap<char, 0x80>& cm_rough,
58 for (
int y = 0; y < cm_rough.size()[1]; y++)
60 for (
int x = 0; x < cm_rough.size()[0]; x++)
63 const float d = dm[pos];
65 const char type = (pos ==
s ?
's' : (pos == e ?
'e' :
' '));
66 if (
d == std::numeric_limits<float>::max())
68 fprintf(stderr,
"xxx%c ", type);
71 else if (cm_rough[pos] == 100)
73 fprintf(stderr,
"***%c ", type);
76 fprintf(stderr,
"%3.1f%c ",
d, type);
78 fprintf(stderr,
"\n");
80 for (
int x = 0; x < cm_rough.size()[0]; x++)
82 fprintf(stderr,
"---- ");
84 fprintf(stderr,
"\n");
90 #endif // PLANNER_CSPACE_DISTANCE_MAP_UTILS_H