From 92a0dcacf7dbea33fd08a6c89378a28a7fed426f Mon Sep 17 00:00:00 2001 From: Yu Asabe Date: Wed, 30 Mar 2022 14:51:13 +0900 Subject: [PATCH] Add new interfaces --- include/autoware_v2x/cpm_application.hpp | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/include/autoware_v2x/cpm_application.hpp b/include/autoware_v2x/cpm_application.hpp index ce85419..6b8efae 100644 --- a/include/autoware_v2x/cpm_application.hpp +++ b/include/autoware_v2x/cpm_application.hpp @@ -19,7 +19,8 @@ namespace v2x std::string uuidToHexString(const unique_identifier_msgs::msg::UUID&); void indicate(const DataIndication &, UpPacketPtr) override; void set_interval(vanetza::Clock::duration); - void updateObjectsStack(const autoware_auto_perception_msgs::msg::PredictedObjects::ConstSharedPtr); + void setAllObjectsOfPersonsAnimalsToSend(const autoware_auto_perception_msgs::msg::PredictedObjects::ConstSharedPtr); + void updateObjectsList(const autoware_auto_perception_msgs::msg::PredictedObjects::ConstSharedPtr); void updateMGRS(double *, double *); void updateRP(double *, double *, double *); void updateGenerationDeltaTime(int *, long long *); @@ -27,8 +28,10 @@ namespace v2x void send(); struct Object { - int objectID; // 0-255 - rclcpp::Time timestamp; + std::string uuid; + int objectID; // 0-255 for CPM + vanetza::Clock::time_point timestamp; + rclcpp::Time timestamp_ros; double position_x; double position_y; double position_z; @@ -36,6 +39,10 @@ namespace v2x double orientation_y; double orientation_z; double orientation_w; + double twist_linear_x; + double twist_linear_y; + double twist_angular_x; + double twist_angular_y; int shape_x; int shape_y; int shape_z; @@ -46,8 +53,9 @@ namespace v2x int yawAngle; vanetza::PositionFix position; int timeOfMeasurement; + bool to_send; }; - std::vector objectsStack; + std::vector objectsList; std::vector receivedObjectsStack; private: @@ -72,10 +80,13 @@ namespace v2x int generationDeltaTime_; long long gdt_timestamp_; - bool updating_objects_stack_; + double objectConfidenceThreshold_; + + bool updating_objects_list_; bool sending_; bool is_sender_; bool reflect_packet_; + bool include_all_persons_and_animals_; }; }