Nav2 Navigation Stack - jazzy  jazzy
ROS 2 Navigation Stack
path_align_critic.hpp
1 // Copyright (c) 2023 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.
14 
15 #ifndef NAV2_MPPI_CONTROLLER__CRITICS__PATH_ALIGN_CRITIC_HPP_
16 #define NAV2_MPPI_CONTROLLER__CRITICS__PATH_ALIGN_CRITIC_HPP_
17 
18 #include "nav2_mppi_controller/critic_function.hpp"
19 #include "nav2_mppi_controller/models/state.hpp"
20 #include "nav2_mppi_controller/tools/utils.hpp"
21 
22 namespace mppi::critics
23 {
24 
33 {
34 public:
38  void initialize() override;
39 
45  void score(CriticData & data) override;
46 
47 protected:
48  size_t offset_from_furthest_{0};
49  int trajectory_point_step_{0};
50  float threshold_to_consider_{0};
51  float max_path_occupancy_ratio_{0};
52  bool use_path_orientations_{false};
53  unsigned int power_{0};
54  float weight_{0};
55 };
56 
57 } // namespace mppi::critics
58 
59 #endif // NAV2_MPPI_CONTROLLER__CRITICS__PATH_ALIGN_CRITIC_HPP_
Abstract critic objective function to score trajectories.
void score(CriticData &data) override
Evaluate cost related to trajectories path alignment.
void initialize() override
Initialize critic.
Data to pass to critics for scoring, including state, trajectories, pruned path, global goal,...
Definition: critic_data.hpp:45