Class PlannerNode

Inheritance Relationships

Base Type

  • public rclcpp_lifecycle::LifecycleNode

Class Documentation

class PlannerNode : public rclcpp_lifecycle::LifecycleNode

ROS 2 lifecycle node that manages path planning in Easy Navigation.

Handles lifecycle transitions, plugin loading, and invokes the planner to compute paths.

Public Types

using CallbackReturnT = rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn

Public Functions

explicit PlannerNode(const rclcpp::NodeOptions &options = rclcpp::NodeOptions())

Constructor.

Parameters:

options – Optional node configuration.

~PlannerNode()

Destructor.

CallbackReturnT on_configure(const rclcpp_lifecycle::State &state)

Configure the node.

Parameters:

state – Current lifecycle state.

Returns:

SUCCESS if configuration succeeded.

CallbackReturnT on_activate(const rclcpp_lifecycle::State &state)

Activate the node.

Parameters:

state – Current lifecycle state.

Returns:

SUCCESS if activation succeeded.

CallbackReturnT on_deactivate(const rclcpp_lifecycle::State &state)

Deactivate the node.

Parameters:

state – Current lifecycle state.

Returns:

SUCCESS if deactivation succeeded.

CallbackReturnT on_cleanup(const rclcpp_lifecycle::State &state)

Clean up the node.

Parameters:

state – Current lifecycle state.

Returns:

SUCCESS if cleanup succeeded.

CallbackReturnT on_shutdown(const rclcpp_lifecycle::State &state)

Shutdown the node.

Parameters:

state – Current lifecycle state.

Returns:

SUCCESS if shutdown succeeded.

CallbackReturnT on_error(const rclcpp_lifecycle::State &state)

Handle lifecycle transition errors.

Parameters:

state – Current lifecycle state.

Returns:

SUCCESS if error handling completed.

nav_msgs::msg::Path get_path() const

Get the current planned path.

Returns:

Path message with the last computed path.

void cycle(std::shared_ptr<NavState> nav_state, bool trigger = false)

Execute a non-real-time cycle.

Parameters:
  • nav_state – Shared pointer to the navigation state structure.

  • trigger – If tru, a cycle is executed independently of the frequency set

const rclcpp::Time get_last_rt_execution_ts() const

Get the timestamp of the last real-time execution.

Returns:

Timestamp of the last RT execution.

const rclcpp::Time get_last_execution_ts() const

Get the timestamp of the last non-RT execution.

Returns:

Timestamp of the last execution.