30 #ifndef MCL_3DL_RAYCASTS_RAYCAST_USING_KDTREE_H
31 #define MCL_3DL_RAYCASTS_RAYCAST_USING_KDTREE_H
43 template <
typename POINT_TYPE>
49 RaycastUsingKDTree(
const float map_grid_size_x,
const float map_grid_size_y,
const float map_grid_size_z,
50 const float hit_tolerance)
53 ,
map_grid_max_(std::max({map_grid_size_x, map_grid_size_y, map_grid_size_z}))
73 bool collision(
false);
76 const POINT_TYPE* point =
nullptr;
81 std::vector<int> id(1);
82 std::vector<float> sqdist(1);
86 point = &(
kdtree_->getInputCloud()->points[
id[0]]);
88 const float d0 = std::sqrt(sqdist[0]);
90 POINT_TYPE center_prev;
91 center_prev.x = pos_prev.
x_;
92 center_prev.y = pos_prev.
y_;
93 center_prev.z = pos_prev.
z_;
96 const float d1 = std::sqrt(sqdist[0]);
124 #endif // MCL_3DL_RAYCASTS_RAYCAST_USING_KDTREE_H