15 #ifndef CONCEALER__AUTOWARE_UNIVERSE_USER_HPP_
16 #define CONCEALER__AUTOWARE_UNIVERSE_USER_HPP_
18 #if __has_include(<autoware_adapi_v1_msgs/msg/localization_initialization_state.hpp>)
19 #include <autoware_adapi_v1_msgs/msg/localization_initialization_state.hpp>
22 #include <autoware_adapi_v1_msgs/msg/mrm_state.hpp>
23 #include <autoware_adapi_v1_msgs/srv/clear_route.hpp>
24 #include <autoware_adapi_v1_msgs/srv/initialize_localization.hpp>
25 #include <autoware_adapi_v1_msgs/srv/set_route_points.hpp>
26 #include <autoware_auto_control_msgs/msg/ackermann_control_command.hpp>
27 #include <autoware_auto_perception_msgs/msg/traffic_signal_array.hpp>
28 #include <autoware_auto_planning_msgs/msg/path_with_lane_id.hpp>
29 #include <autoware_auto_system_msgs/msg/emergency_state.hpp>
30 #include <autoware_auto_vehicle_msgs/msg/gear_command.hpp>
37 #include <geometry_msgs/msg/pose_with_covariance_stamped.hpp>
38 #include <tier4_external_api_msgs/msg/emergency.hpp>
39 #include <tier4_external_api_msgs/srv/engage.hpp>
40 #include <tier4_external_api_msgs/srv/set_velocity_limit.hpp>
41 #include <tier4_planning_msgs/msg/trajectory.hpp>
42 #include <tier4_rtc_msgs/msg/cooperate_status_array.hpp>
43 #include <tier4_rtc_msgs/srv/auto_mode_with_module.hpp>
44 #include <tier4_rtc_msgs/srv/cooperate_commands.hpp>
45 #include <tier4_system_msgs/msg/autoware_state.hpp>
61 #if __has_include(<autoware_adapi_v1_msgs/msg/localization_initialization_state.hpp>)
77 tier4_rtc_msgs::msg::CooperateStatusArray latest_cooperate_status_array;
83 auto receiveMrmState(
const autoware_adapi_v1_msgs::msg::MrmState & msg) -> void;
85 auto receiveEmergencyState(
const tier4_external_api_msgs::msg::Emergency & msg) -> void;
87 #define DEFINE_STATE_PREDICATE(NAME, VALUE) \
88 auto is##NAME() const noexcept \
90 using tier4_system_msgs::msg::AutowareState; \
91 return getAutowareState().state == AutowareState::VALUE; \
93 static_assert(true, "")
104 #undef DEFINE_STATE_PREDICATE
107 auto sendSIGINT() ->
void override;
113 template <
typename... Ts>
117 getAckermannControlCommand(
"/control/command/control_cmd", *this),
118 getAutowareState(
"/api/iv_msgs/autoware/state", *this),
119 getCooperateStatusArray(
"/api/external/get/rtc_status", *this, [this](const auto & v) { latest_cooperate_status_array = v; }),
120 getEmergencyState(
"/api/external/get/emergency", *
this, [
this](
const auto & v) { receiveEmergencyState(v); }),
121 #
if __has_include(<autoware_adapi_v1_msgs/msg/localization_initialization_state.hpp>)
122 getLocalizationState("/api/localization/initialization_state", *this),
124 getMrmState(
"/api/fail_safe/mrm_state", *
this, [
this](
const auto & v) { receiveMrmState(v); }),
125 getPathWithLaneId(
"/planning/scenario_planning/lane_driving/behavior_planning/path_with_lane_id", *
this),
126 getTrajectory(
"/api/iv_msgs/planning/scenario_planning/trajectory", *
this),
127 getTurnIndicatorsCommandImpl(
"/control/command/turn_indicators_cmd", *
this),
128 requestClearRoute(
"/api/routing/clear_route", *
this),
129 requestCooperateCommands(
"/api/external/set/rtc_commands", *
this),
130 requestEngage(
"/api/external/set/engage", *
this),
131 requestInitialPose(
"/api/localization/initialize", *
this),
133 requestSetRoutePoints(
"/api/routing/set_route_points", *
this, std::chrono::seconds(10)),
134 requestSetRtcAutoMode(
"/api/external/set/rtc_auto_mode", *
this),
135 requestSetVelocityLimit(
"/api/autoware/set/velocity_limit", *
this)
140 ~FieldOperatorApplicationFor()
override;
142 auto engage() ->
void override;
144 auto engageable() const ->
bool override;
146 auto engaged() const ->
bool override;
148 auto getAutowareStateName() const ->
std::
string override;
150 auto getWaypoints() const -> traffic_simulator_msgs::msg::WaypointsArray override;
152 auto getTurnIndicatorsCommand() const
155 auto getEmergencyStateName() const ->
std::
string override;
157 auto getMinimumRiskManeuverBehaviorName() const ->
std::
string override;
159 auto getMinimumRiskManeuverStateName() const ->
std::
string override;
161 auto initialize(const geometry_msgs::msg::Pose &) ->
void override;
163 auto plan(const
std::vector<geometry_msgs::msg::PoseStamped> &) ->
void override;
165 auto clearRoute() ->
void override;
167 auto requestAutoModeForCooperation(const
std::
string &,
bool) ->
void override;
169 auto restrictTargetSpeed(
double) const ->
double override;
171 auto sendCooperateCommand(const
std::
string &, const
std::
string &) ->
void override;
173 auto setVelocityLimit(
double) ->
void override;
Definition: autoware_universe.hpp:38
SubscriberWrapper< autoware_auto_planning_msgs::msg::PathWithLaneId > getPathWithLaneId
Definition: field_operator_application_for_autoware_universe.hpp:110
CONCEALER_PUBLIC FieldOperatorApplicationFor(Ts &&... xs)
Definition: field_operator_application_for_autoware_universe.hpp:114
Definition: field_operator_application.hpp:44
Definition: field_operator_application.hpp:60
#define CONCEALER_PUBLIC
Definition: visibility.hpp:49
#define DEFINE_STATE_PREDICATE(NAME, VALUE)
Definition: field_operator_application_for_autoware_universe.hpp:87
Definition: field_operator_application.hpp:161
Definition: autoware.hpp:30
Definition: junit5.hpp:25
std::string string
Definition: junit5.hpp:26
Definition: transition_assertion.hpp:39