Nav2 Navigation Stack - jazzy  jazzy
ROS 2 Navigation Stack
prefer_forward_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__PREFER_FORWARD_CRITIC_HPP_
16 #define NAV2_MPPI_CONTROLLER__CRITICS__PREFER_FORWARD_CRITIC_HPP_
17 
18 #include "nav2_mppi_controller/critic_function.hpp"
19 #include "nav2_mppi_controller/tools/utils.hpp"
20 
21 namespace mppi::critics
22 {
23 
29 {
30 public:
34  void initialize() override;
35 
42  void score(CriticData & data) override;
43 
44 protected:
45  unsigned int power_{0};
46  float weight_{0};
47  float threshold_to_consider_{0};
48 };
49 
50 } // namespace mppi::critics
51 
52 #endif // NAV2_MPPI_CONTROLLER__CRITICS__PREFER_FORWARD_CRITIC_HPP_
Abstract critic objective function to score trajectories.
void score(CriticData &data) override
Evaluate cost related to robot orientation at goal pose (considered only if robot near last goal in c...
void initialize() override
Initialize critic.
Data to pass to critics for scoring, including state, trajectories, pruned path, global goal,...
Definition: critic_data.hpp:45