Class MethodBase
Defined in File MethodBase.hpp
Inheritance Relationships
Derived Types
public easynav::ControllerMethodBase(Class ControllerMethodBase)public easynav::LocalizerMethodBase(Class LocalizerMethodBase)public easynav::MapsManagerBase(Class MapsManagerBase)public easynav::PlannerMethodBase(Class PlannerMethodBase)
Class Documentation
Base class for Easy Navigation method plugins.
Provides lifecycle integration and update-rate management for components such as localizers, controllers, or map managers.
Subclassed by easynav::ControllerMethodBase, easynav::LocalizerMethodBase, easynav::MapsManagerBase, easynav::PlannerMethodBase
Public Functions
Default constructor.
Virtual destructor.
Initializes the method with the given node and plugin name.
Also reads update frequencies and sets up internal state.
- Parameters:
parent_node – Shared pointer to the parent lifecycle node.
plugin_name – Name of the plugin (used for parameters and logging).
- Returns:
std::expected<void, std::string> indicating success or failure.
Hook for custom setup logic in derived classes.
Called from initialize(). Can be overridden to implement extra initialization steps.
- Returns:
std::expected<void, std::string> indicating success or failure.
Get a shared pointer to the parent lifecycle node.
- Returns:
Shared pointer to the lifecycle node.
Get the name assigned to the plugin.
- Returns:
Plugin name as a constant reference.
Get the TF namespace.
- Returns:
TF namespace with a trailing “/”.
Check whether it is time to run a real-time update.
Uses the configured real-time frequency to determine whether sufficient time has elapsed.
- Returns:
True if update should run, false otherwise.
Check whether it is time to run a normal (non-RT) update.
Uses the configured frequency to determine whether sufficient time has elapsed.
- Returns:
True if update should run, false otherwise.
Mark that the real-time update has just run.
Records the current time as the last RT execution timestamp. Call this right after completing a successful RT iteration.
- Post:
get_last_rt_execution_ts() reflects the time of this call.
Mark that the normal (non-RT) update has just run.
Records the current time as the last non-RT execution timestamp. Call this right after completing a successful non-RT iteration.
- Post:
get_last_execution_ts() reflects the time of this call.
Get the timestamp of the last real-time execution.
Note
If no RT run has been recorded yet, this value may be zero-initialized.
- Returns:
Reference to the last RT execution time as recorded by setRunRT().
Get the timestamp of the last non-RT execution.
Note
If no non-RT run has been recorded yet, this value may be zero-initialized.
- Returns:
Reference to the last non-RT execution time as recorded by setRun().