EasyNav Costmap Stack
Loading...
Searching...
No Matches
CostmapFilter.hpp
Go to the documentation of this file.
1// Copyright 2025 Intelligent Robotics Lab
2//
3// This file is part of the project Easy Navigation (EasyNav in short)
4// licensed under the GNU General Public License v3.0.
5// See <http://www.gnu.org/licenses/> for details.
6//
7// Easy Navigation program is free software: you can redistribute it and/or modify
8// it under the terms of the GNU General Public License as published by
9// the Free Software Foundation, either version 3 of the License, or
10// (at your option) any later version.
11//
12// This program is distributed in the hope that it will be useful,
13// but WITHOUT ANY WARRANTY; without even the implied warranty of
14// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15// GNU General Public License for more details.
16//
17// You should have received a copy of the GNU General Public License
18// along with this program. If not, see <http://www.gnu.org/licenses/>.
19
20
21#ifndef EASYNAV_PLANNER__FILTERS__COSTMAPFILTER_HPP_
22#define EASYNAV_PLANNER__FILTERS__COSTMAPFILTER_HPP_
23
24#include <expected>
25#include <string>
26
28#include "easynav_common/types/NavState.hpp"
29
30#include "rclcpp_lifecycle/lifecycle_node.hpp"
31
32namespace easynav
33{
34
36{
37public:
39
40 std::expected<void, std::string>
42 const std::shared_ptr<rclcpp_lifecycle::LifecycleNode> parent_node,
43 const std::string plugin_name);
44
45 virtual std::expected<void, std::string> on_initialize() = 0;
46 virtual void update(NavState & nav_state) = 0;
47
48protected:
49 std::shared_ptr<rclcpp_lifecycle::LifecycleNode> get_node() const;
50
51 const std::string & get_plugin_name() const;
52
53protected:
54 std::shared_ptr<rclcpp_lifecycle::LifecycleNode> parent_node_ {nullptr};
55 std::string plugin_name_;
56};
57} // namespace easynav
58
59#endif // EASYNAV_PLANNER__FILTERS__COSTMAPFILTER_HPP_
std::string plugin_name_
Definition CostmapFilter.hpp:55
std::shared_ptr< rclcpp_lifecycle::LifecycleNode > parent_node_
Definition CostmapFilter.hpp:54
std::expected< void, std::string > initialize(const std::shared_ptr< rclcpp_lifecycle::LifecycleNode > parent_node, const std::string plugin_name)
Definition CostmapFilter.cpp:38
CostmapFilter()
Definition CostmapFilter.cpp:32
const std::string & get_plugin_name() const
Definition CostmapFilter.cpp:55
std::shared_ptr< rclcpp_lifecycle::LifecycleNode > get_node() const
Definition CostmapFilter.cpp:49
virtual void update(NavState &nav_state)=0
virtual std::expected< void, std::string > on_initialize()=0
Provides a mapping for often used cost values.
Definition cost_values.hpp:41