19#ifndef EASYNAV_PLANNER__PLANNERNODE_HPP_
20#define EASYNAV_PLANNER__PLANNERNODE_HPP_
25#include "rclcpp/macros.hpp"
26#include "rclcpp_lifecycle/lifecycle_node.hpp"
27#include "easynav_core/PlannerMethodBase.hpp"
28#include "easynav_core/PluginSwitcher.hpp"
29#include "nav_msgs/msg/path.hpp"
48 using
CallbackReturnT = rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn;
55 const rclcpp::NodeOptions & options = rclcpp::NodeOptions());
106 [[nodiscard]] nav_msgs::msg::Path
get_path() const;
129 void check_path(
NavState & nav_state);
132 std::optional<
bool> last_path_finite_;
136 PluginSwitcher<PlannerMethodBase> planner_;
A blackboard-like structure to hold the current state of the navigation system.
A generic, type-safe, thread-safe blackboard to hold runtime state.
Definition NavState.hpp:87
void cycle(std::shared_ptr< NavState > nav_state, bool trigger=false)
Execute a non-real-time cycle.
Definition PlannerNode.cpp:103
CallbackReturnT on_activate(const rclcpp_lifecycle::State &state)
Activate the node.
Definition PlannerNode.cpp:66
CallbackReturnT on_configure(const rclcpp_lifecycle::State &state)
Configure the node.
Definition PlannerNode.cpp:60
CallbackReturnT on_shutdown(const rclcpp_lifecycle::State &state)
Shutdown the node.
Definition PlannerNode.cpp:89
const rclcpp::Time get_last_execution_ts() const
Get the timestamp of the last non-RT execution.
Definition PlannerNode.cpp:165
CallbackReturnT on_cleanup(const rclcpp_lifecycle::State &state)
Clean up the node.
Definition PlannerNode.cpp:82
nav_msgs::msg::Path get_path() const
Get the current planned path.
const rclcpp::Time get_last_rt_execution_ts() const
Get the timestamp of the last real-time execution.
Definition PlannerNode.cpp:156
CallbackReturnT on_error(const rclcpp_lifecycle::State &state)
Handle lifecycle transition errors.
Definition PlannerNode.cpp:96
rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn CallbackReturnT
Definition PlannerNode.hpp:48
PlannerNode(const rclcpp::NodeOptions &options=rclcpp::NodeOptions())
Constructor.
Definition PlannerNode.cpp:35
CallbackReturnT on_deactivate(const rclcpp_lifecycle::State &state)
Deactivate the node.
Definition PlannerNode.cpp:76
Definition CircularBuffer.hpp:24
Definition PointPerception.hpp:51