15 #ifndef CONCEALER__AUTOWARE_USER_HPP_
16 #define CONCEALER__AUTOWARE_USER_HPP_
20 #include <autoware_adapi_v1_msgs/msg/mrm_state.hpp>
21 #include <autoware_adapi_v1_msgs/srv/change_operation_mode.hpp>
22 #include <autoware_adapi_v1_msgs/srv/clear_route.hpp>
23 #include <autoware_adapi_v1_msgs/srv/initialize_localization.hpp>
24 #include <autoware_adapi_v1_msgs/srv/set_route_points.hpp>
25 #include <autoware_control_msgs/msg/control.hpp>
26 #include <autoware_vehicle_msgs/msg/gear_command.hpp>
27 #include <autoware_vehicle_msgs/msg/turn_indicators_command.hpp>
36 #include <geometry_msgs/msg/accel.hpp>
37 #include <geometry_msgs/msg/pose_stamped.hpp>
38 #include <geometry_msgs/msg/pose_with_covariance_stamped.hpp>
39 #include <rclcpp/rclcpp.hpp>
40 #include <tier4_external_api_msgs/msg/emergency.hpp>
41 #include <tier4_external_api_msgs/srv/engage.hpp>
42 #include <tier4_external_api_msgs/srv/set_velocity_limit.hpp>
43 #include <tier4_rtc_msgs/msg/cooperate_status_array.hpp>
44 #include <tier4_rtc_msgs/srv/auto_mode_with_module.hpp>
45 #include <tier4_rtc_msgs/srv/cooperate_commands.hpp>
46 #include <traffic_simulator_msgs/msg/waypoints_array.hpp>
67 using Control = autoware_control_msgs::msg::Control;
69 using Emergency = tier4_external_api_msgs::msg::Emergency;
70 #if __has_include(<autoware_adapi_v1_msgs/msg/localization_initialization_state.hpp>)
71 using LocalizationInitializationState = autoware_adapi_v1_msgs::msg::LocalizationInitializationState;
73 using MrmState = autoware_adapi_v1_msgs::msg::MrmState;
74 #if __has_include(<autoware_adapi_v1_msgs/msg/operation_mode_state.hpp>)
75 using OperationModeState = autoware_adapi_v1_msgs::msg::OperationModeState;
77 #if __has_include(<autoware_adapi_v1_msgs/msg/route_state.hpp>)
78 using RouteState = autoware_adapi_v1_msgs::msg::RouteState;
82 using ClearRoute = autoware_adapi_v1_msgs::srv::ClearRoute;
84 using Engage = tier4_external_api_msgs::srv::Engage;
95 #if __has_include(<autoware_adapi_v1_msgs/msg/localization_initialization_state.hpp>)
99 #if __has_include(<autoware_adapi_v1_msgs/msg/operation_mode_state.hpp>)
103 #if __has_include(<autoware_adapi_v1_msgs/msg/route_state.hpp>)
125 template <
typename Thunk =
void (*)()>
132 if (
time_limit <= std::chrono::steady_clock::now()) {
134 "Simulator waited for the Autoware state to transition to ", state,
138 rclcpp::GenericRate<std::chrono::steady_clock>(std::chrono::seconds(1)).sleep();
Definition: task_queue.hpp:28
#define CONCEALER_PUBLIC
Definition: visibility.hpp:49
Definition: autoware_universe.hpp:40
Definition: lanelet_wrapper.hpp:40
geometry_msgs::msg::Pose Pose
Definition: lanelet_wrapper.hpp:66
geometry_msgs::msg::PoseStamped PoseStamped
Definition: lanelet_wrapper.hpp:67
std::string string
Definition: junit5.hpp:26
Autoware encountered some problem that led to a simulation failure.
Definition: exception.hpp:41
Definition: field_operator_application.hpp:52
Subscriber< AutowareState > getAutowareState
Definition: field_operator_application.hpp:91
tier4_rtc_msgs::srv::AutoModeWithModule AutoModeWithModule
Definition: field_operator_application.hpp:87
autoware_vehicle_msgs::msg::TurnIndicatorsCommand TurnIndicatorsCommand
Definition: field_operator_application.hpp:80
Service< SetRoutePoints > requestSetRoutePoints
Definition: field_operator_application.hpp:112
Subscriber< Emergency > getEmergencyState
Definition: field_operator_application.hpp:94
auto requestAutoModeForCooperation(const std::string &, bool) -> void
Definition: field_operator_application.cpp:389
Service< Engage > requestEngage
Definition: field_operator_application.hpp:110
auto waitForAutowareStateToBe(const LegacyAutowareState &state, Thunk thunk=[] {})
Definition: field_operator_application.hpp:126
autoware_control_msgs::msg::Control Control
Definition: field_operator_application.hpp:67
autoware_adapi_v1_msgs::srv::InitializeLocalization InitializeLocalization
Definition: field_operator_application.hpp:85
autoware_adapi_v1_msgs::srv::ClearRoute ClearRoute
Definition: field_operator_application.hpp:82
bool initialized
Definition: field_operator_application.hpp:55
Subscriber< Control > getCommand
Definition: field_operator_application.hpp:92
auto initialize(const geometry_msgs::msg::Pose &) -> void
Definition: field_operator_application.cpp:302
auto engaged() const -> bool
Definition: field_operator_application.cpp:296
Subscriber< CooperateStatusArray > getCooperateStatusArray
Definition: field_operator_application.hpp:93
Service< SetVelocityLimit > requestSetVelocityLimit
Definition: field_operator_application.hpp:114
tier4_rtc_msgs::msg::CooperateStatusArray CooperateStatusArray
Definition: field_operator_application.hpp:68
Subscriber< priority::PathWithLaneId > getPathWithLaneId
Definition: field_operator_application.hpp:102
pid_t process_id
Definition: field_operator_application.hpp:53
auto enableAutowareControl() -> void
Definition: field_operator_application.cpp:255
auto setVelocityLimit(double) -> void
Definition: field_operator_application.cpp:504
std::string minimum_risk_maneuver_state
Definition: field_operator_application.hpp:61
TaskQueue task_queue
Definition: field_operator_application.hpp:123
tier4_external_api_msgs::srv::SetVelocityLimit SetVelocityLimit
Definition: field_operator_application.hpp:88
Service< ChangeOperationMode > requestEnableAutowareControl
Definition: field_operator_application.hpp:115
auto clearRoute() -> void
Definition: field_operator_application.cpp:243
autoware_adapi_v1_msgs::msg::MrmState MrmState
Definition: field_operator_application.hpp:73
tier4_external_api_msgs::msg::Emergency Emergency
Definition: field_operator_application.hpp:69
auto sendCooperateCommand(const std::string &, const std::string &) -> void
Definition: field_operator_application.cpp:414
auto engageable() const -> bool
Definition: field_operator_application.cpp:289
~FieldOperatorApplication()
Definition: field_operator_application.cpp:168
Service< InitializeLocalization > requestInitialPose
Definition: field_operator_application.hpp:111
Subscriber< MrmState > getMrmState
Definition: field_operator_application.hpp:98
Service< ClearRoute > requestClearRoute
Definition: field_operator_application.hpp:108
auto plan(const std::vector< geometry_msgs::msg::PoseStamped > &) -> void
Definition: field_operator_application.cpp:333
std::chrono::steady_clock::time_point time_limit
Definition: field_operator_application.hpp:59
tier4_rtc_msgs::srv::CooperateCommands CooperateCommands
Definition: field_operator_application.hpp:83
autoware_adapi_v1_msgs::srv::SetRoutePoints SetRoutePoints
Definition: field_operator_application.hpp:86
Subscriber< TurnIndicatorsCommand > getTurnIndicatorsCommand
Definition: field_operator_application.hpp:106
auto engage() -> void
Definition: field_operator_application.cpp:263
Service< AutoModeWithModule > requestSetRtcAutoMode
Definition: field_operator_application.hpp:113
auto spinSome() -> void
Definition: field_operator_application.cpp:529
Service< CooperateCommands > requestCooperateCommands
Definition: field_operator_application.hpp:109
autoware_adapi_v1_msgs::srv::ChangeOperationMode ChangeOperationMode
Definition: field_operator_application.hpp:89
CONCEALER_PUBLIC FieldOperatorApplication(const pid_t)
Definition: field_operator_application.cpp:80
auto getLegacyAutowareState() const -> LegacyAutowareState
Definition: field_operator_application.cpp:517
tier4_external_api_msgs::srv::Engage Engage
Definition: field_operator_application.hpp:84
std::string minimum_risk_maneuver_behavior
Definition: field_operator_application.hpp:63
autoware_system_msgs::msg::AutowareState AutowareState
Definition: field_operator_application.hpp:66
std::atomic< bool > finalized
Definition: field_operator_application.hpp:57
Definition: legacy_autoware_state.hpp:37
value_type value
Definition: legacy_autoware_state.hpp:49