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.
route_state_worker.hpp
Go to the documentation of this file.
1#pragma once
2
3/*
4 * Copyright (C) 2020-2022 LEIDOS.
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
7 * use this file except in compliance with the License. You may obtain a copy of
8 * the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15 * License for the specific language governing permissions and limitations under
16 * the License.
17 */
18
19#include <rclcpp/rclcpp.hpp>
20#include <stdexcept>
21
22namespace route {
23
25
26 public:
27
48 };
49
62 };
63
64 RouteStateWorker() = default;
65
70 void onRouteEvent(RouteEvent event);
71
76
77 void setLoggerInterface(rclcpp::node_interfaces::NodeLoggingInterface::SharedPtr logger);
78
79 private:
80
81 // private local variable tracks the current route satte
82 RouteState state_ = RouteState::LOADING;
83
84 // Logger interface
85 rclcpp::node_interfaces::NodeLoggingInterface::SharedPtr logger_;
86 };
87
88}
RouteState getRouteState() const
Get current route state machine state.
rclcpp::node_interfaces::NodeLoggingInterface::SharedPtr logger_
void setLoggerInterface(rclcpp::node_interfaces::NodeLoggingInterface::SharedPtr logger)
void onRouteEvent(RouteEvent event)
Process route event based on designed state machine diagram.