19 #ifndef SSC_INTERFACE__SSC_INTERFACE_HPP_
20 #define SSC_INTERFACE__SSC_INTERFACE_HPP_
28 #include <autoware_auto_control_msgs/msg/high_level_control_command.hpp>
30 #include <autoware_auto_planning_msgs/msg/trajectory_point.hpp>
32 #include <automotive_platform_msgs/msg/gear_command.hpp>
33 #include <automotive_platform_msgs/msg/gear_feedback.hpp>
34 #include <automotive_platform_msgs/msg/speed_mode.hpp>
35 #include <automotive_platform_msgs/msg/steering_feedback.hpp>
36 #include <automotive_platform_msgs/msg/steer_mode.hpp>
37 #include <automotive_platform_msgs/msg/turn_signal_command.hpp>
38 #include <automotive_platform_msgs/msg/velocity_accel_cov.hpp>
40 #include <autoware_auto_vehicle_msgs/msg/headlights_command.hpp>
41 #include <autoware_auto_vehicle_msgs/msg/raw_control_command.hpp>
42 #include <autoware_auto_control_msgs/msg/ackermann_control_command.hpp>
43 #include <autoware_auto_vehicle_msgs/msg/vehicle_control_command.hpp>
44 #include <autoware_auto_vehicle_msgs/msg/vehicle_kinematic_state.hpp>
45 #include <autoware_auto_vehicle_msgs/msg/vehicle_state_command.hpp>
46 #include <autoware_auto_vehicle_msgs/msg/vehicle_state_report.hpp>
47 #include <autoware_auto_vehicle_msgs/srv/autonomy_mode_change.hpp>
49 #include <std_msgs/msg/bool.hpp>
51 #include <rclcpp/rclcpp.hpp>
63 using automotive_platform_msgs::msg::GearFeedback;
64 using automotive_platform_msgs::msg::SpeedMode;
65 using automotive_platform_msgs::msg::SteeringFeedback;
66 using automotive_platform_msgs::msg::SteerMode;
67 using automotive_platform_msgs::msg::TurnSignalCommand;
68 using automotive_platform_msgs::msg::VelocityAccelCov;
69 using autoware_auto_vehicle_msgs::msg::HeadlightsCommand;
70 using autoware_auto_control_msgs::msg::HighLevelControlCommand;
71 using autoware_auto_vehicle_msgs::msg::RawControlCommand;
74 using autoware_auto_control_msgs::msg::AckermannControlCommand;
76 using autoware_auto_vehicle_msgs::msg::VehicleStateCommand;
77 using autoware_auto_vehicle_msgs::srv::AutonomyModeChange;
115 bool8_t update(std::chrono::nanoseconds timeout)
override;
120 bool8_t send_state_command(
const VehicleStateCommand & msg)
override;
125 bool8_t send_control_command(
const HighLevelControlCommand & msg);
130 bool8_t send_control_command(
const RawControlCommand & msg)
override;
140 bool8_t send_control_command(
const AckermannControlCommand & msg)
override;
145 bool8_t handle_mode_change_request(ModeChangeRequest::SharedPtr request)
override;
147 static void kinematic_bicycle_model(
152 rclcpp::Publisher<SscGearCommand>::SharedPtr m_gear_cmd_pub;
153 rclcpp::Publisher<SpeedMode>::SharedPtr m_speed_cmd_pub;
154 rclcpp::Publisher<SteerMode>::SharedPtr m_steer_cmd_pub;
155 rclcpp::Publisher<TurnSignalCommand>::SharedPtr m_turn_signal_cmd_pub;
158 rclcpp::Publisher<VehicleKinematicState>::SharedPtr m_kinematic_state_pub;
161 rclcpp::SubscriptionBase::SharedPtr m_dbw_state_sub, m_gear_feedback_sub, m_vel_accel_sub,
164 rclcpp::Logger m_logger;
169 std::unique_ptr<DbwStateMachine> m_dbw_state_machine;
174 bool m_seen_steer{
false};
175 bool m_seen_vel_accel{
false};
177 std::mutex m_vehicle_kinematic_state_mutex;
179 void on_dbw_state_report(
const std_msgs::msg::Bool::SharedPtr & msg);
180 void on_gear_report(
const GearFeedback::SharedPtr & msg);
181 void on_steer_report(
const SteeringFeedback::SharedPtr & msg);
182 void on_vel_accel_report(
const VelocityAccelCov::SharedPtr & msg);
187 #endif // SSC_INTERFACE__SSC_INTERFACE_HPP_