18 #ifndef VEHICLE_INTERFACE__PLATFORM_INTERFACE_HPP_
19 #define VEHICLE_INTERFACE__PLATFORM_INTERFACE_HPP_
23 #include <autoware_auto_control_msgs/msg/ackermann_control_command.hpp>
25 #include <autoware_auto_vehicle_msgs/msg/gear_command.hpp>
26 #include <autoware_auto_vehicle_msgs/msg/gear_report.hpp>
27 #include <autoware_auto_vehicle_msgs/msg/hand_brake_command.hpp>
28 #include <autoware_auto_vehicle_msgs/msg/hand_brake_report.hpp>
29 #include <autoware_auto_vehicle_msgs/msg/hazard_lights_command.hpp>
30 #include <autoware_auto_vehicle_msgs/msg/hazard_lights_report.hpp>
31 #include <autoware_auto_vehicle_msgs/msg/headlights_command.hpp>
32 #include <autoware_auto_vehicle_msgs/msg/headlights_report.hpp>
33 #include <autoware_auto_vehicle_msgs/msg/horn_command.hpp>
34 #include <autoware_auto_vehicle_msgs/msg/horn_report.hpp>
35 #include <autoware_auto_vehicle_msgs/msg/wipers_command.hpp>
36 #include <autoware_auto_vehicle_msgs/msg/wipers_report.hpp>
37 #include <autoware_auto_vehicle_msgs/msg/raw_control_command.hpp>
38 #include <autoware_auto_vehicle_msgs/msg/vehicle_control_command.hpp>
39 #include <autoware_auto_vehicle_msgs/msg/vehicle_odometry.hpp>
40 #include <autoware_auto_vehicle_msgs/msg/vehicle_state_command.hpp>
41 #include <autoware_auto_vehicle_msgs/msg/vehicle_state_report.hpp>
42 #include <autoware_auto_vehicle_msgs/srv/autonomy_mode_change.hpp>
43 #include <vehicle_interface/visibility_control.hpp>
49 using autoware_auto_vehicle_msgs::msg::GearCommand;
50 using autoware_auto_vehicle_msgs::msg::GearReport;
51 using autoware_auto_vehicle_msgs::msg::HandBrakeCommand;
52 using autoware_auto_vehicle_msgs::msg::HandBrakeReport;
53 using autoware_auto_vehicle_msgs::msg::HazardLightsCommand;
54 using autoware_auto_vehicle_msgs::msg::HazardLightsReport;
55 using autoware_auto_vehicle_msgs::msg::HeadlightsCommand;
56 using autoware_auto_vehicle_msgs::msg::HeadlightsReport;
57 using autoware_auto_vehicle_msgs::msg::HornCommand;
58 using autoware_auto_vehicle_msgs::msg::HornReport;
59 using autoware_auto_vehicle_msgs::msg::WipersCommand;
60 using autoware_auto_vehicle_msgs::msg::WipersReport;
61 using autoware_auto_vehicle_msgs::msg::RawControlCommand;
62 using autoware_auto_control_msgs::msg::AckermannControlCommand;
64 using autoware_auto_vehicle_msgs::msg::VehicleStateCommand;
65 using autoware_auto_vehicle_msgs::msg::VehicleStateReport;
66 using autoware_auto_vehicle_msgs::msg::VehicleOdometry;
74 namespace vehicle_interface
95 virtual bool8_t update(std::chrono::nanoseconds timeout) = 0;
101 virtual bool8_t send_state_command(
const VehicleStateCommand & msg) = 0;
113 virtual bool8_t send_control_command(
const AckermannControlCommand & msg) = 0;
119 virtual bool8_t send_control_command(
const RawControlCommand & msg) = 0;
125 virtual bool8_t handle_mode_change_request(ModeChangeRequest::SharedPtr request) = 0;
132 const VehicleStateReport & get_state_report()
const noexcept;
135 const VehicleOdometry & get_odometry()
const noexcept;
138 const HeadlightsReport & get_headlights_report()
const noexcept;
141 const HornReport & get_horn_report()
const noexcept;
144 const WipersReport & get_wipers_report()
const noexcept;
147 const GearReport & get_gear_report()
const noexcept;
153 virtual void send_gear_command(
const GearCommand & msg);
159 virtual void send_hand_brake_command(
const HandBrakeCommand & msg);
165 virtual void send_headlights_command(
const HeadlightsCommand & msg);
171 virtual void send_horn_command(
const HornCommand & msg);
177 virtual void send_wipers_command(
const WipersCommand & msg);
183 virtual void send_hazard_lights_command(
const HazardLightsCommand & msg);
187 VehicleStateReport & state_report() noexcept;
189 VehicleOdometry & odometry() noexcept;
191 HeadlightsReport & headlights_report() noexcept;
193 HornReport & horn_report() noexcept;
195 WipersReport & wipers_report() noexcept;
197 GearReport & gear_report() noexcept;
200 HeadlightsReport m_headlights_report{};
201 HornReport m_horn_report{};
202 WipersReport m_wipers_report{};
203 VehicleStateReport m_state_report{};
204 GearReport m_gear_report{};
205 VehicleOdometry m_odometry{};
211 #endif // VEHICLE_INTERFACE__PLATFORM_INTERFACE_HPP_