Easy Navigation
Loading...
Searching...
No Matches
MapsManagerNode.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
22
23#ifndef EASYNAV_MAPSMANAGER__MAPSMANAGERNODE_HPP_
24#define EASYNAV_MAPSMANAGER__MAPSMANAGERNODE_HPP_
25
26#include "rclcpp/macros.hpp"
27#include "rclcpp_lifecycle/lifecycle_node.hpp"
28
29#include "easynav_core/MapsManagerBase.hpp"
30#include "pluginlib/class_loader.hpp"
31
32namespace easynav
33{
34
41class MapsManagerNode : public rclcpp_lifecycle::LifecycleNode
42{
43public:
44 RCLCPP_SMART_PTR_DEFINITIONS(MapsManagerNode)
45 using CallbackReturnT = rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn;
46
52 explicit MapsManagerNode(
53 const rclcpp::NodeOptions & options = rclcpp::NodeOptions());
54
57
63 CallbackReturnT on_configure(const rclcpp_lifecycle::State & state);
64
70 CallbackReturnT on_activate(const rclcpp_lifecycle::State & state);
71
77 CallbackReturnT on_deactivate(const rclcpp_lifecycle::State & state);
78
84 CallbackReturnT on_cleanup(const rclcpp_lifecycle::State & state);
85
91 CallbackReturnT on_shutdown(const rclcpp_lifecycle::State & state);
92
98 CallbackReturnT on_error(const rclcpp_lifecycle::State & state);
99
104 void cycle(std::shared_ptr<NavState> nav_state);
105
106private:
108 std::unique_ptr<pluginlib::ClassLoader<MapsManagerBase>> maps_manager_loader_;
109
111 std::vector<std::shared_ptr<MapsManagerBase>> maps_managers_;
112};
113
114} // namespace easynav
115
116#endif // EASYNAV_MAPSMANAGER__MAPSMANAGERNODE_HPP_
MapsManagerNode(const rclcpp::NodeOptions &options=rclcpp::NodeOptions())
Constructor.
Definition MapsManagerNode.cpp:39
CallbackReturnT on_activate(const rclcpp_lifecycle::State &state)
Activate the node.
Definition MapsManagerNode.cpp:115
CallbackReturnT on_configure(const rclcpp_lifecycle::State &state)
Configure the node.
Definition MapsManagerNode.cpp:72
void cycle(std::shared_ptr< NavState > nav_state)
Execute one update cycle (non real-time).
Definition MapsManagerNode.cpp:152
CallbackReturnT on_shutdown(const rclcpp_lifecycle::State &state)
Shutdown the node.
Definition MapsManagerNode.cpp:138
CallbackReturnT on_cleanup(const rclcpp_lifecycle::State &state)
Cleanup the node.
Definition MapsManagerNode.cpp:131
CallbackReturnT on_error(const rclcpp_lifecycle::State &state)
Handle errors during lifecycle transitions.
Definition MapsManagerNode.cpp:145
rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn CallbackReturnT
Definition MapsManagerNode.hpp:45
CallbackReturnT on_deactivate(const rclcpp_lifecycle::State &state)
Deactivate the node.
Definition MapsManagerNode.cpp:123
A generic, type-safe, lock-free blackboard to hold runtime state.
Definition NavState.hpp:62
Definition RTTFBuffer.hpp:30
Definition PointPerception.hpp:56