19#include <gtest/gtest_prod.h>
20#include <rclcpp/rclcpp.hpp>
21#include <carma_planning_msgs/msg/plugin.hpp>
25#include <carma_ros2_utils/carma_lifecycle_node.hpp>
206 virtual carma_ros2_utils::CallbackReturn
on_error_plugin(const std::
string &exception_string);
213 carma_ros2_utils::CallbackReturn
handle_on_configure(const rclcpp_lifecycle::State &) override;
214 carma_ros2_utils::CallbackReturn
handle_on_activate(const rclcpp_lifecycle::State &) override;
215 carma_ros2_utils::CallbackReturn
handle_on_deactivate(const rclcpp_lifecycle::State &) override;
216 carma_ros2_utils::CallbackReturn
handle_on_cleanup(const rclcpp_lifecycle::State &) override;
217 carma_ros2_utils::CallbackReturn
handle_on_shutdown(const rclcpp_lifecycle::State &) override;
218 carma_ros2_utils::CallbackReturn
handle_on_error(const rclcpp_lifecycle::State &, const std::
string &exception_string) override;
PluginBaseNode provides default functionality for all carma guidance plugins. This includes basic sta...
virtual uint8_t get_type()
Returns the type of this plugin according to the carma_planning_msgs::Plugin type enum....
virtual bool get_activation_status() final
Returns the activation status of this plugin. The plugins API callbacks will only be triggered when t...
virtual carma_ros2_utils::CallbackReturn on_deactivate_plugin()
Method which is triggered when this plugin is moved from the ACTIVE to INACTIVE states....
carma_ros2_utils::CallbackReturn handle_on_deactivate(const rclcpp_lifecycle::State &) override
carma_ros2_utils::CallbackReturn handle_on_error(const rclcpp_lifecycle::State &, const std::string &exception_string) override
carma_wm::WorldModelConstPtr wm_
virtual std::string get_capability()=0
Get the capability string representing this plugins capabilities Method must be overriden by extendin...
virtual ~PluginBaseNode()=default
Virtual destructor for safe deletion.
carma_ros2_utils::CallbackReturn handle_on_cleanup(const rclcpp_lifecycle::State &) override
std::string get_plugin_name() const
Return the name of this plugin.
virtual carma_wm::WorldModelConstPtr get_world_model() final
Method to return the default world model provided as a convience by this base class If this method or...
carma_ros2_utils::CallbackReturn handle_on_configure(const rclcpp_lifecycle::State &) override
virtual carma_ros2_utils::CallbackReturn on_cleanup_plugin()
Method which is triggered when this plugin is moved from the INACTIVE to UNCONFIGURED states....
virtual bool get_availability()=0
Get the availability status of this plugin based on the current operating environment....
PluginBaseNode(const rclcpp::NodeOptions &)
PluginBaseNode constructor.
virtual carma_ros2_utils::CallbackReturn on_configure_plugin()=0
Method which is triggered when this plugin is moved from the UNCONFIGURED to INACTIVE states....
rclcpp::Publisher< carma_planning_msgs::msg::Plugin >::SharedPtr plugin_discovery_pub_
Publisher for plugin discovery. This publisher will begin publishing.
void lazy_wm_initialization()
Helper function for lazy initialization of wm_listener_. If already initialized method returns (ie....
std::shared_ptr< carma_wm::WMListener > wm_listener_
virtual std::shared_ptr< carma_wm::WMListener > get_world_model_listener() final
Method to return the default world model listener provided as a convience by this base class If this ...
virtual carma_ros2_utils::CallbackReturn on_shutdown_plugin()
Method which is triggered when this plugin is moved from any state to FINALIZED This method should be...
carma_ros2_utils::CallbackReturn handle_on_activate(const rclcpp_lifecycle::State &) override
std::string get_plugin_name_and_ns() const
Return the name of this plugin with namespace. NOTE: If only the name of the plugin is required,...
virtual carma_ros2_utils::CallbackReturn on_error_plugin(const std::string &exception_string)
Method which is triggered when an unhandled exception occurs in this plugin This method should be use...
virtual std::string get_version_id()=0
Returns the version id of this plugin.
void discovery_timer_callback()
Callback for the plugin discovery timer which will publish the plugin discovery message.
carma_ros2_utils::CallbackReturn handle_on_shutdown(const rclcpp_lifecycle::State &) override
virtual carma_ros2_utils::CallbackReturn on_activate_plugin()
Method which is triggered when this plugin is moved from the INACTIVE to ACTIVE states....
rclcpp::TimerBase::SharedPtr discovery_timer_
Timer to trigger publication of the plugin discovery message at a fixed frequency.
FRIEND_TEST(carma_guidance_plugins_test, connections_test)
std::shared_ptr< const WorldModel > WorldModelConstPtr