Nav2 Navigation Stack - humble  humble
ROS 2 Navigation Stack
path_align_legacy_critic.hpp
1 // Copyright (c) 2022 Samsung Research America, @artofnothingness Alexey Budyakov
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_LEGACY_CRITIC_HPP_
16 #define NAV2_MPPI_CONTROLLER__CRITICS__PATH_ALIGN_LEGACY_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 
34 {
35 public:
39  void initialize() override;
40 
46  void score(CriticData & data) override;
47 
48 protected:
49  size_t offset_from_furthest_{0};
50  int trajectory_point_step_{0};
51  float threshold_to_consider_{0};
52  float max_path_occupancy_ratio_{0};
53  bool use_path_orientations_{false};
54  unsigned int power_{0};
55  float weight_{0};
56 };
57 
58 } // namespace mppi::critics
59 
60 #endif // NAV2_MPPI_CONTROLLER__CRITICS__PATH_ALIGN_LEGACY_CRITIC_HPP_
Abstract critic objective function to score trajectories.
Critic objective function for aligning to the path. Note: High settings of this will follow the path ...
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:39