18#include <carma_planning_msgs/srv/plan_maneuvers.hpp>
28 std::vector<std::string>
topics = {};
30 auto srv = std::make_shared<carma_planning_msgs::srv::GetPluginApi::Request>();
33 auto plan_response =
sc_s_->async_send_request(srv);
35 auto future_status = plan_response.wait_for(std::chrono::milliseconds(200));
39 topics = plan_response.get()->plan_service;
42 std::ostringstream stream;
43 stream <<
"Received Topics: ";
44 for (
const auto& topic :
topics) {
45 stream << topic <<
", ";
48 RCLCPP_INFO_STREAM(
nh_->get_logger(), stream.str().c_str());
52 RCLCPP_ERROR_STREAM(
nh_->get_logger(),
"service call failed...");
53 RCLCPP_ERROR_STREAM(
nh_->get_logger(),
"client: " <<
sc_s_);
static const std::string STRATEGIC_PLAN_CAPABILITY
std::shared_ptr< carma_ros2_utils::CarmaLifecycleNode > nh_
carma_ros2_utils::ClientPtr< carma_planning_msgs::srv::GetPluginApi > sc_s_
std::vector< std::string > get_topics_for_capability(const std::string &query_string)
Initialize the Capabilities interface by querying the Health Monitor node and processing the plugins ...