29 #ifndef POINT_EXPANDER_H
30 #define POINT_EXPANDER_H
32 #define POT_HIGH 1.0e10
36 #include <opencv2/core/core.hpp>
37 #include <unordered_set>
39 #include <eigen3/Eigen/Dense>
64 bool findGoalOnMap(
const Eigen::Vector2d &_start,
const uint32_t &_cycles,
float *_potential,
const std::map<uint32_t, Eigen::Vector2d> &_goals,
const uint32_t &_optimizationSteps, Eigen::Vector2d &_foundPoint, int32_t &_segIdx,
const uint32_t &_radius);
72 template <
class T,
class S,
class C>
73 void clearpq(std::priority_queue<T, S, C> &q)
75 q = std::priority_queue<T, S, C>();
80 Index(
int index,
float c,
float d,
float p)
88 Index(
int x_val,
int y_val,
int nx,
float c,
float d,
float p)
90 i = x_val + y_val * nx;
98 int x_val = (
i % nx) + dist_x;
99 int y_val = (
i / nx) + dist_y;
101 if (x_val < 0 || x_val > nx || y_val < 0 || y_val > ny)
102 return Index(-1, -1, -1, -1);
104 return Index(x_val, y_val, nx, 0, 0, 0);
119 float dx = abs(
getX(_nx) - _p.
getX(_nx));
120 float dy = abs(
getY(_nx) - _p.
getY(_nx));
122 return std::sqrt(dx * dx + dy * dy);
141 Index findGoal(
const Index &_start,
const uint32_t &_cycles,
float *_potential,
const std::map<uint32_t, Index> &_goals,
const uint32_t &_optimizationSteps, int32_t &segIdx,
const uint32_t &_radius);
143 bool isGoal(
Index _p,
const std::map<uint32_t, Index> &_goals, int32_t &segIdx);
149 #endif // VORONOI_EXPANDER_H