Nav2 Navigation Stack - humble  humble
ROS 2 Navigation Stack
velocity_deadband_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__VELOCITY_DEADBAND_CRITIC_HPP_
16 #define NAV2_MPPI_CONTROLLER__CRITICS__VELOCITY_DEADBAND_CRITIC_HPP_
17 
18 #include <vector>
19 
20 #include "nav2_mppi_controller/critic_function.hpp"
21 #include "nav2_mppi_controller/models/state.hpp"
22 #include "nav2_mppi_controller/tools/utils.hpp"
23 
24 namespace mppi::critics
25 {
26 
32 {
33 public:
37  void initialize() override;
38 
44  void score(CriticData & data) override;
45 
46 protected:
47  unsigned int power_{0};
48  float weight_{0};
49  std::vector<float> deadband_velocities_{0.0f, 0.0f, 0.0f};
50 };
51 
52 } // namespace mppi::critics
53 
54 #endif // NAV2_MPPI_CONTROLLER__CRITICS__VELOCITY_DEADBAND_CRITIC_HPP_
Abstract critic objective function to score trajectories.
Critic objective function for enforcing feasible constraints.
void initialize() override
Initialize critic.
void score(CriticData &data) override
Evaluate cost related to goal following.
Data to pass to critics for scoring, including state, trajectories, pruned path, global goal,...
Definition: critic_data.hpp:39