Carma-platform v4.2.0
CARMA Platform is built on robot operating system (ROS) and utilizes open source software (OSS) that enables Cooperative Driving Automation (CDA) features to allow Automated Driving Systems to interact and cooperate with infrastructure and other vehicles through communication.
light_controlled_intersection_tactical_plugin_node.hpp
Go to the documentation of this file.
1/*
2 * Copyright (C) 2022 LEIDOS.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 * use this file except in compliance with the License. You may obtain a copy of
6 * the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 * License for the specific language governing permissions and limitations under
14 * the License.
15 */
16
17#pragma once
18
19#include <rclcpp/rclcpp.hpp>
20#include <functional>
21
25
27{
33 {
34 private:
35 // Config for this object
37
38 carma_ros2_utils::ClientPtr<carma_planning_msgs::srv::PlanTrajectory> yield_client_;
39
40 // Worker object
41 std::shared_ptr<LightControlledIntersectionTacticalPlugin> worker_;
42
43 public:
44
48 explicit LightControlledIntersectionTransitPluginNode(const rclcpp::NodeOptions &);
49
53 rcl_interfaces::msg::SetParametersResult
54 parameter_update_callback(const std::vector<rclcpp::Parameter> &parameters);
55
57 // Overrides
60 std::shared_ptr<rmw_request_id_t>,
61 carma_planning_msgs::srv::PlanTrajectory::Request::SharedPtr req,
62 carma_planning_msgs::srv::PlanTrajectory::Response::SharedPtr resp) override;
63
64 bool get_availability() override;
65
66 std::string get_version_id() override;
67
71 carma_ros2_utils::CallbackReturn on_configure_plugin() override;
72 };
73
74} // light_controlled_intersection_tactical_plugin
TacticalPlugin base class which can be extended by user provided plugins which wish to implement the ...
LightControlledIntersectionTransitPluginNode(const rclcpp::NodeOptions &)
LightControlledIntersectionTransitPluginNode constructor.
rcl_interfaces::msg::SetParametersResult parameter_update_callback(const std::vector< rclcpp::Parameter > &parameters)
Callback for dynamic parameter updates.
bool get_availability() override
Get the availability status of this plugin based on the current operating environment....
void plan_trajectory_callback(std::shared_ptr< rmw_request_id_t >, carma_planning_msgs::srv::PlanTrajectory::Request::SharedPtr req, carma_planning_msgs::srv::PlanTrajectory::Response::SharedPtr resp) override
Extending class provided callback which should return a planned trajectory based on the provided traj...
carma_ros2_utils::CallbackReturn on_configure_plugin() override
This method should be used to load parameters and will be called on the configure state transition.
Stuct containing the algorithm configuration values for light_controlled_intersection_tactical_plugin...