39 const int local_range)
const 44 std::list<CyclicVecFloat<3, 2>> path;
46 for (
auto p : path_grid)
57 const float inter = interval / d.
len();
59 if (d[0] == 0 && d[1] == 0)
61 const int yaw_inc = std::copysign(1, d[2]);
62 for (
int yaw = p_prev[2]; yaw != p_prev[2] + d[2]; yaw += yaw_inc)
67 else if (d[2] == 0 || ds.
sqlen() > local_range * local_range)
69 for (
float i = 0; i < 1.0; i += inter)
71 const float x2 = p_prev[0] * (1 - i) + p[0] * i;
72 const float y2 = p_prev[1] * (1 - i) + p[1] * i;
73 const float yaw2 = p_prev[2] + i * d[2];
81 const float r1 = radiuses.first;
82 const float r2 = radiuses.second;
83 const float yawf = p[2] * M_PI * 2.0 /
angle_;
84 const float yawf_prev = p_prev[2] * M_PI * 2.0 /
angle_;
86 const float cx = p[0] + r2 * cosf(yawf + M_PI / 2);
87 const float cy = p[1] + r2 * sinf(yawf + M_PI / 2);
88 const float cx_prev = p_prev[0] + r1 * cosf(yawf_prev + M_PI / 2);
89 const float cy_prev = p_prev[1] + r1 * sinf(yawf_prev + M_PI / 2);
91 for (
float i = 0; i < 1.0; i += inter)
93 const float r = r1 * (1.0 - i) + r2 * i;
94 const float cx2 = cx_prev * (1.0 - i) + cx * i;
95 const float cy2 = cy_prev * (1.0 - i) + cy * i;
96 const float cyaw = p_prev[2] + i * d[2];
97 const float cyawf = cyaw * M_PI * 2.0 /
angle_;
99 const float x2 = cx2 - r * cosf(cyawf + M_PI / 2);
100 const float y2 = cy2 - r * sinf(cyawf + M_PI / 2);
const std::pair< float, float > & getRadiuses(const int start_angle, const CyclicVecInt< 3, 2 > &end) const
std::list< CyclicVecFloat< 3, 2 > > interpolate(const std::list< CyclicVecInt< 3, 2 >> &path_grid, const float interval, const int local_range) const
void cycle(const int res, const ArgList &...rest)