2021-11-10 08:13:32 +00:00
|
|
|
#ifndef V2X_APP_HPP_EUIC2VFR
|
|
|
|
#define V2X_APP_HPP_EUIC2VFR
|
|
|
|
|
|
|
|
#include "rclcpp/rclcpp.hpp"
|
|
|
|
#include "std_msgs/msg/string.hpp"
|
2022-03-28 02:17:51 +00:00
|
|
|
#include "autoware_auto_perception_msgs/msg/predicted_objects.hpp"
|
2024-06-12 22:51:59 +00:00
|
|
|
#include "autoware_auto_vehicle_msgs/msg/velocity_report.hpp"
|
2024-07-08 10:08:49 +00:00
|
|
|
#include "autoware_adapi_v1_msgs/srv/get_vehicle_dimensions.hpp"
|
2024-06-12 22:51:59 +00:00
|
|
|
#include "autoware_adapi_v1_msgs/msg/vehicle_dimensions.hpp"
|
2024-07-09 13:54:53 +00:00
|
|
|
#include "autoware_adapi_v1_msgs/msg/vehicle_status.hpp"
|
2021-11-10 08:13:32 +00:00
|
|
|
#include "tf2_msgs/msg/tf_message.hpp"
|
|
|
|
#include <boost/asio/io_service.hpp>
|
|
|
|
#include "autoware_v2x/cpm_application.hpp"
|
2024-06-12 22:51:59 +00:00
|
|
|
#include "autoware_v2x/cam_application.hpp"
|
2021-11-10 08:13:32 +00:00
|
|
|
#include "autoware_v2x/time_trigger.hpp"
|
|
|
|
#include "autoware_v2x/link_layer.hpp"
|
|
|
|
#include "autoware_v2x/ethernet_device.hpp"
|
|
|
|
#include "autoware_v2x/positioning.hpp"
|
|
|
|
#include "autoware_v2x/security.hpp"
|
|
|
|
#include "autoware_v2x/router_context.hpp"
|
2021-11-10 15:21:32 +00:00
|
|
|
// #include "autoware_v2x/v2x_node.hpp"
|
2021-11-10 08:13:32 +00:00
|
|
|
|
|
|
|
namespace v2x
|
|
|
|
{
|
2021-11-10 15:21:32 +00:00
|
|
|
class V2XNode;
|
2021-11-10 08:13:32 +00:00
|
|
|
class V2XApp
|
|
|
|
{
|
|
|
|
public:
|
2021-11-10 15:21:32 +00:00
|
|
|
V2XApp(V2XNode *);
|
2021-11-10 08:13:32 +00:00
|
|
|
void start();
|
2022-03-28 02:17:51 +00:00
|
|
|
void objectsCallback(const autoware_auto_perception_msgs::msg::PredictedObjects::ConstSharedPtr);
|
2024-07-08 10:08:49 +00:00
|
|
|
void setVehicleDimensions(const autoware_adapi_v1_msgs::msg::VehicleDimensions &);
|
2024-06-12 22:51:59 +00:00
|
|
|
void velocityReportCallback(const autoware_auto_vehicle_msgs::msg::VelocityReport::ConstSharedPtr);
|
2024-07-09 13:54:53 +00:00
|
|
|
void vehicleStatusCallback(const autoware_adapi_v1_msgs::msg::VehicleStatus::ConstSharedPtr);
|
2021-11-10 08:13:32 +00:00
|
|
|
void tfCallback(const tf2_msgs::msg::TFMessage::ConstSharedPtr);
|
|
|
|
|
|
|
|
CpmApplication *cp;
|
2024-06-12 22:51:59 +00:00
|
|
|
CamApplication *cam;
|
2021-11-10 15:21:32 +00:00
|
|
|
// V2XNode *v2x_node;
|
2021-11-10 08:13:32 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
friend class CpmApplication;
|
2024-06-12 22:51:59 +00:00
|
|
|
friend class CamApplication;
|
2021-11-10 08:13:32 +00:00
|
|
|
friend class Application;
|
2021-11-10 15:21:32 +00:00
|
|
|
V2XNode* node_;
|
2021-11-10 08:13:32 +00:00
|
|
|
bool tf_received_;
|
2021-11-10 20:30:21 +00:00
|
|
|
int tf_interval_;
|
2024-06-12 22:51:59 +00:00
|
|
|
bool velocity_report_received_;
|
|
|
|
int velocity_report_interval_;
|
2024-07-09 13:54:53 +00:00
|
|
|
bool vehicle_status_received_;
|
|
|
|
int vehicle_status_interval_;
|
2024-06-12 22:51:59 +00:00
|
|
|
bool vehicle_dimensions_set_;
|
2021-11-10 08:13:32 +00:00
|
|
|
bool cp_started_;
|
2024-06-12 22:51:59 +00:00
|
|
|
bool cam_started_;
|
2021-11-10 08:13:32 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2024-07-08 10:08:49 +00:00
|
|
|
#endif
|