Easy Navigation
Loading...
Searching...
No Matches
MapsManagerNode.hpp
Go to the documentation of this file.
1// Copyright 2025 Intelligent Robotics Lab
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
18
19#ifndef EASYNAV_MAPS_MANAGER__MAPSMANAGERNODE_HPP_
20#define EASYNAV_MAPS_MANAGER__MAPSMANAGERNODE_HPP_
21
22#include <memory>
23
24#include "rclcpp/macros.hpp"
25#include "rclcpp_lifecycle/lifecycle_node.hpp"
26#include "easynav_core/MapsManagerBase.hpp"
27#include "easynav_core/PluginSwitcher.hpp"
28
29namespace easynav
30{
31
38class MapsManagerNode : public rclcpp_lifecycle::LifecycleNode
39{
40public:
41 RCLCPP_SMART_PTR_DEFINITIONS(MapsManagerNode)
42 using CallbackReturnT = rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn;
43
49 explicit MapsManagerNode(
50 const rclcpp::NodeOptions & options = rclcpp::NodeOptions());
51
54
60 CallbackReturnT on_configure(const rclcpp_lifecycle::State & state);
61
67 CallbackReturnT on_activate(const rclcpp_lifecycle::State & state);
68
74 CallbackReturnT on_deactivate(const rclcpp_lifecycle::State & state);
75
81 CallbackReturnT on_cleanup(const rclcpp_lifecycle::State & state);
82
88 CallbackReturnT on_shutdown(const rclcpp_lifecycle::State & state);
89
95 CallbackReturnT on_error(const rclcpp_lifecycle::State & state);
96
101 void cycle(std::shared_ptr<NavState> nav_state);
102
103private:
106 PluginSwitcher<MapsManagerBase> maps_managers_;
107};
108
109} // namespace easynav
110
111#endif // EASYNAV_MAPS_MANAGER__MAPSMANAGERNODE_HPP_
MapsManagerNode(const rclcpp::NodeOptions &options=rclcpp::NodeOptions())
Constructor.
Definition MapsManagerNode.cpp:30
CallbackReturnT on_activate(const rclcpp_lifecycle::State &state)
Activate the node.
Definition MapsManagerNode.cpp:61
CallbackReturnT on_configure(const rclcpp_lifecycle::State &state)
Configure the node.
Definition MapsManagerNode.cpp:55
void cycle(std::shared_ptr< NavState > nav_state)
Execute one update cycle (non real-time).
Definition MapsManagerNode.cpp:98
CallbackReturnT on_shutdown(const rclcpp_lifecycle::State &state)
Shutdown the node.
Definition MapsManagerNode.cpp:84
CallbackReturnT on_cleanup(const rclcpp_lifecycle::State &state)
Cleanup the node.
Definition MapsManagerNode.cpp:77
CallbackReturnT on_error(const rclcpp_lifecycle::State &state)
Handle errors during lifecycle transitions.
Definition MapsManagerNode.cpp:91
rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn CallbackReturnT
Definition MapsManagerNode.hpp:42
CallbackReturnT on_deactivate(const rclcpp_lifecycle::State &state)
Deactivate the node.
Definition MapsManagerNode.cpp:71
A generic, type-safe, thread-safe blackboard to hold runtime state.
Definition NavState.hpp:87
Definition CircularBuffer.hpp:24
Definition PointPerception.hpp:51