EasyNav Plugins
Loading...
Searching...
No Matches
OctomapFilter.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__OCTOMAPFILTER_HPP_
18#define EASYNAV_PLANNER__FILTERS__OCTOMAPFILTER_HPP_
19
20#include <string>
21
22#include "octomap/octomap.h"
23#include "easynav_common/types/NavState.hpp"
24#include "rclcpp_lifecycle/lifecycle_node.hpp"
25
26namespace easynav
27{
28namespace octomap
29{
30
32{
33public:
35
36 void
38 const std::shared_ptr<rclcpp_lifecycle::LifecycleNode> parent_node,
39 const std::string & plugin_name);
40
41 virtual void on_initialize() = 0;
42 virtual void update(::easynav::NavState & nav_state) = 0;
43
45 void set_map_resolution(float resolution) {map_resolution_ = resolution;}
46
47protected:
48 std::shared_ptr<rclcpp_lifecycle::LifecycleNode> get_node() const;
49
50 const std::string & get_plugin_name() const;
51
52protected:
53 std::shared_ptr<rclcpp_lifecycle::LifecycleNode> parent_node_ {nullptr};
54 std::string plugin_name_;
55
56 float map_resolution_ {0.1};
57};
58} // namespace octomap
59} // namespace easynav
60#endif // EASYNAV_PLANNER__FILTERS__OCTOMAPFILTER_HPP_
std::string plugin_name_
Definition OctomapFilter.hpp:54
void initialize(const std::shared_ptr< rclcpp_lifecycle::LifecycleNode > parent_node, const std::string &plugin_name)
Definition OctomapFilter.cpp:34
std::shared_ptr< rclcpp_lifecycle::LifecycleNode > parent_node_
Definition OctomapFilter.hpp:53
float map_resolution_
Definition OctomapFilter.hpp:56
float get_map_resolution()
Definition OctomapFilter.hpp:44
void set_map_resolution(float resolution)
Definition OctomapFilter.hpp:45
virtual void update(::easynav::NavState &nav_state)=0
const std::string & get_plugin_name() const
Definition OctomapFilter.cpp:50
std::shared_ptr< rclcpp_lifecycle::LifecycleNode > get_node() const
Definition OctomapFilter.cpp:44
OctomapFilter()
Definition OctomapFilter.cpp:28
Definition InflationFilter.hpp:32
Provides a mapping for often used cost values.
Definition cost_values.hpp:41