EasyNav Plugins
Loading...
Searching...
No Matches
NavMapFilter.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 Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15
16
17#ifndef EASYNAV_PLANNER__FILTERS__NAVMAPFILTER_HPP_
18#define EASYNAV_PLANNER__FILTERS__NAVMAPFILTER_HPP_
19
20#include <string>
21
22#include "easynav_common/types/NavState.hpp"
23#include "rclcpp_lifecycle/lifecycle_node.hpp"
24
25namespace easynav
26{
27namespace navmap
28{
29
31{
32public:
34
35 void
37 const std::shared_ptr<rclcpp_lifecycle::LifecycleNode> parent_node,
38 const std::string & plugin_name);
39
40 virtual void on_initialize() = 0;
41 virtual void update(::easynav::NavState & nav_state) = 0;
42
43 virtual bool is_adding_layer() {return false;}
44 virtual std::string get_layer_name() {return "";}
45
47 void set_map_resolution(float resolution) {map_resolution_ = resolution;}
48
49 const std::string & get_plugin_name() const;
50
51protected:
52 std::shared_ptr<rclcpp_lifecycle::LifecycleNode> get_node() const;
53
54protected:
55 std::shared_ptr<rclcpp_lifecycle::LifecycleNode> parent_node_ {nullptr};
56 std::string plugin_name_;
57
58 float map_resolution_ {0.1};
59};
60} // namespace navmap
61} // namespace easynav
62#endif // EASYNAV_PLANNER__FILTERS__NAVMAPFILTER_HPP_
std::string plugin_name_
Definition NavMapFilter.hpp:56
void initialize(const std::shared_ptr< rclcpp_lifecycle::LifecycleNode > parent_node, const std::string &plugin_name)
Definition NavMapFilter.cpp:32
std::shared_ptr< rclcpp_lifecycle::LifecycleNode > parent_node_
Definition NavMapFilter.hpp:55
virtual bool is_adding_layer()
Definition NavMapFilter.hpp:43
float map_resolution_
Definition NavMapFilter.hpp:58
NavMapFilter()
Definition NavMapFilter.cpp:26
virtual void on_initialize()=0
float get_map_resolution()
Definition NavMapFilter.hpp:46
void set_map_resolution(float resolution)
Definition NavMapFilter.hpp:47
virtual void update(::easynav::NavState &nav_state)=0
virtual std::string get_layer_name()
Definition NavMapFilter.hpp:44
const std::string & get_plugin_name() const
Definition NavMapFilter.cpp:49
std::shared_ptr< rclcpp_lifecycle::LifecycleNode > get_node() const
Definition NavMapFilter.cpp:43
Definition AMCLLocalizer.hpp:41
Provides a mapping for often used cost values.
Definition cost_values.hpp:41