Nav2 Navigation Stack - rolling  main
ROS 2 Navigation Stack
distance_heuristic.hpp
1 // Copyright (c) 2026, Open Navigation LLC
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License. Reserved.
14 
15 #ifndef NAV2_SMAC_PLANNER__DISTANCE_HEURISTIC_HPP_
16 #define NAV2_SMAC_PLANNER__DISTANCE_HEURISTIC_HPP_
17 
18 #include "nav2_smac_planner/constants.hpp"
19 #include "nav2_smac_planner/types.hpp"
20 
21 namespace nav2_smac_planner
22 {
23 struct HybridMotionTable;
24 struct LatticeMotionTable;
25 class NodeHybrid;
26 class NodeLattice;
27 
32 template<typename NodeT>
34 {
35 public:
40 
49  template<typename MotionTableT>
51  const float & lookup_table_dim,
52  const MotionModel & motion_model,
53  const unsigned int & dim_3_size,
54  const SearchInfo & search_info,
55  MotionTableT & motion_table);
56 
65  template<typename MotionTableT>
67  const Coordinates & node_coords,
68  const Coordinates & goal_coords,
69  const float & obstacle_heuristic,
70  MotionTableT & motion_table);
71 
72 protected:
73  // Dubin / Reeds-Shepp lookup and size for dereferencing
74  LookupTable dist_heuristic_lookup_table_;
75  float size_lookup_;
76 };
77 
78 } // namespace nav2_smac_planner
79 #endif // NAV2_SMAC_PLANNER__DISTANCE_HEURISTIC_HPP_
Distance Heuristic implementation for graph, Hybrid-A*.
DistanceHeuristic()
A constructor for nav2_smac_planner::DistanceHeuristic.
void precomputeDistanceHeuristic(const float &lookup_table_dim, const MotionModel &motion_model, const unsigned int &dim_3_size, const SearchInfo &search_info, MotionTableT &motion_table)
Compute the SE2 distance heuristic.
float getDistanceHeuristic(const Coordinates &node_coords, const Coordinates &goal_coords, const float &obstacle_heuristic, MotionTableT &motion_table)
Compute the Distance heuristic.
Implementation of coordinate2d structure.
Definition: types.hpp:224
Search properties and penalties.
Definition: types.hpp:38